latest (dev)
Copy
Latest development documentation · Updated 2026-10-15
tensorplay.functional.floor_divide
- tensorplay.functional.floor_divide(input, other, *, out=None) Tensor[source]
Note
truncation division. To restore the previous behavior use
tensorplay.div()withrounding_mode='trunc'.Computes
inputdivided byother, elementwise, and floors the result.Supports broadcasting to a common shape, type promotion, and integer and float inputs.
- Parameters:
- Keyword Arguments:
out (Tensor, optional) – the output tensor.
Example:
>>> a = tensorplay.tensor([4.0, 3.0]) >>> b = tensorplay.tensor([2.0, 2.0]) >>> tensorplay.floor_divide(a, b) tensor([2.0, 1.0]) >>> tensorplay.floor_divide(a, 1.4) tensor([2.0, 2.0])
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?

