mindspore.Tensor.greater_equal

View Source On Gitee
Tensor.greater_equal(other) Tensor

Computes the boolean value of \(self >= other\) element-wise.

Parameters

other (Union[Tensor, Number]) – other 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 GPU CPU

Examples

>>> import mindspore
>>> import numpy as np
>>> from mindspore import Tensor
>>> input = Tensor(np.array([1, 2, 3]), mindspore.int32)
>>> other = Tensor(np.array([1, 1, 4]), mindspore.int32)
>>> output = input.greater_equal(other)
>>> print(output)
[True True False]