mindspore.ops.FloorMod

class mindspore.ops.FloorMod[source]

Computes the remainder of division element-wise. It’s a flooring divide.

Refer to mindspore.ops.floor_mod() for more detail.

Supported Platforms:

Ascend GPU CPU

Examples

>>> x = Tensor(np.array([2, 4, -1]), mindspore.int32)
>>> y = Tensor(np.array([3, 3, 3]), mindspore.int32)
>>> floor_mod = ops.FloorMod()
>>> output = floor_mod(x, y)
>>> print(output)
[2 1 2]