mindspore.mint.greater_equal
- mindspore.mint.greater_equal(input, other) Tensor[source]
Compute whether \(input >=other\) element-wise.
\[\begin{split}out_{i} =\begin{cases} & \text{True, if } input_{i}>=other_{i} \\ & \text{False, if } input_{i}<other_{i} \end{cases}\end{split}\]Note
Broadcasting and implicit type conversion are supported.
The inputs must be two tensors (data types cannot be bool at the same time), or one tensor and one scalar.
- Parameters
- Returns
Boolean Tensor
- Supported Platforms:
Ascend
Examples
>>> import mindspore >>> input = mindspore.tensor([1, 2, 3], dtype=mindspore.int32) >>> other = mindspore.tensor([1, 1, 4], dtype=mindspore.int32) >>> mindspore.mint.greater_equal(input, other) Tensor(shape=[3], dtype=Bool, value= [ True, True, False]) >>> y = 2.1 >>> mindspore.mint.greater_equal(input, y) Tensor(shape=[3], dtype=Bool, value= [False, False, True])