mindspore.ops.RealDiv

class mindspore.ops.RealDiv[source]

Divides the first input tensor by the second input tensor in floating-point type element-wise.

Refer to mindspore.ops.div() for more details.

Supported Platforms:

Ascend GPU CPU

Examples

>>> x = Tensor(np.array([1.0, 2.0, 3.0]), mindspore.float32)
>>> y = Tensor(np.array([4.0, 5.0, 6.0]), mindspore.float32)
>>> realdiv = ops.RealDiv()
>>> output = realdiv(x, y)
>>> print(output)
[0.25 0.4  0.5 ]