mindspore.ops.LogicalAnd

class mindspore.ops.LogicalAnd[source]

Computes the “logical AND” of two tensors element-wise.

Refer to mindspore.ops.logical_and() for more details.

Supported Platforms:

Ascend GPU CPU

Examples

>>> x = Tensor(np.array([True, False, True]), mindspore.bool_)
>>> y = Tensor(np.array([True, True, False]), mindspore.bool_)
>>> logical_and = ops.LogicalAnd()
>>> output = logical_and(x, y)
>>> print(output)
[ True False False]