logical_and(x1, x2, dtype=None)¶
Computes the truth value of x1 AND x2 element-wise.
Numpy arguments out, where, casting, order, subok, signature, and extobj are not supported.
Tensor or scalar. Boolean result of the logical AND operation applied to the elements of x1 and x2; the shape is determined by broadcasting. This is a scalar if both x1 and x2 are scalars.
- Supported Platforms:
>>> import mindspore.numpy as np >>> x1 = np.array([True, False]) >>> x2 = np.array([False, False]) >>> output = np.logical_and(x1, x2) >>> print(output) [False False]