mindspore.mint.greater_equal
- mindspore.mint.greater_equal(input, other)[source]
Given two Tensors, compares them element-wise to check if each element in the self Tensor is greater than or equal to the corresponding element in the second Tensor.
Refer to
mindspore.ops.ge()
for more details.- Parameters
other (Union[Tensor, Number]) – It should be a Number or Tensor with data type number or bool.
- Returns
Tensor, the shape is the same as the one after broadcasting, and the data type is bool.
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> import numpy as np >>> from mindspore import Tensor, mint >>> input = Tensor(np.array([1, 2, 3]), mindspore.int32) >>> other = Tensor(np.array([1, 1, 4]), mindspore.int32) >>> output = mint.greater_equal(input, other) >>> print(output) [True True False]