mindspore.ops.Minimum
- class mindspore.ops.Minimum[source]
Computes the minimum of input tensors element-wise.
Refer to
mindspore.ops.minimum()
for more detail.- Supported Platforms:
Ascend
GPU
CPU
Examples
>>> # case 1 : same data type >>> x = Tensor(np.array([1.0, 5.0, 3.0]), mindspore.float32) >>> y = Tensor(np.array([4.0, 2.0, 6.0]), mindspore.float32) >>> minimum = ops.Minimum() >>> output = minimum(x, y) >>> print(output) [1. 2. 3.] >>> # case 2 : different data type >>> x = Tensor(np.array([1.0, 5.0, 3.0]), mindspore.int32) >>> y = Tensor(np.array([4.0, 2.0, 6.0]), mindspore.float32) >>> output = minimum(x, y) >>> print(output.dtype) Float32