mindspore.ops.truncate_div
- mindspore.ops.truncate_div(x, y)[source]
Divide the first input tensor x by the second input tensor y element-wise and rounds the results of division towards zero.
Note
Support implicit type conversion and broadcasting.
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> mindspore.ops.truncate_div(mindspore.tensor([2, 4, -1]), mindspore.tensor([3, 3, 3])) Tensor(shape=[3], dtype=Int64, value= [0, 1, 0])