mindspore.mint.trunc
- mindspore.mint.trunc(input)[source]
Returns a tensor with the truncated integer values of the elements of the input tensor.
- Parameters
input (Tensor) – The input tensor.
- Returns
Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> output = mindspore.mint.trunc(mindspore.tensor([3.4742, 0.5466, -0.8008, -3.9079])) >>> print(output) [3. 0. 0. -3.]