mindspore.mint.equal

View Source On AtomGit
mindspore.mint.equal(input, other)[source]

Compute the equivalence of the two inputs element-wise.

Note

input and other comply with the implicit type conversion rules to make the data types consistent.

Parameters
  • input (Tensor) – The first input tensor.

  • other (Tensor) – The second input tensor.

Returns

Boolean tensor

Supported Platforms:

Ascend

Examples

>>> import mindspore
>>> x = mindspore.tensor([1, 2, 3], mindspore.int32)
>>> y = mindspore.tensor([1, 2, 4], mindspore.int32)
>>> output = mindspore.mint.equal(x, y)
>>> print(output)
False