mindspore.Tensor.floor_
- Tensor.floor_()[source]
Rounds a tensor down to the closest integer element-wise.
\[out_i = \lfloor input_i \rfloor\]Warning
This is an experimental API that is subject to change or deletion.
- Returns
Return a tensor with the same shape of input.
- Supported Platforms:
Ascend
Examples
>>> import numpy as np >>> import mindspore >>> from mindspore import Tensor >>> x = Tensor(np.array([1.1, 2.5, -1.5], mindspore.float32) >>> x.floor_() >>> print(x) [1. 2. -2.]