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
After version 2.9.0, this interface will be renamed to mindspore.ops.fmod and the parameters x and y will be renamed to input and other.
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:
AscendGPUCPU
Examples
>>> import mindspore >>> output = mindspore.ops.truncate_mod(mindspore.tensor([2., 4., -1.]), mindspore.tensor([3., 3., 3.])) >>> print(output) [ 2. 1. -1.]