mindspore.ops.truncate_mod
- mindspore.ops.truncate_mod(x, y)[source]
Return the remainder of division element-wise.
Support implicit type conversion and broadcasting.
Warning
The input data does not support 0.
When the elements of input exceed 2048 , the accuracy of operator cannot guarantee the requirement of double thousandths in the mini form.
Due to different architectures, the calculation results of this operator on NPU and CPU may be inconsistent.
If shape is expressed as (D1,D2… ,Dn), then D1*D2… *DN<=1000000,n<=8.
- Parameters
- Returns
Tensor
- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> import mindspore >>> output = mindspore.ops.truncate_mod(mindspore.tensor([2., 4., -1.]), mindspore.tensor([3., 3., 3.])) >>> print(output) [ 2. 1. -1.]