bitwise_xor(x1, x2, dtype=None)¶
Computes the bit-wise XOR of two arrays element-wise. Computes the bit-wise XOR of the underlying binary representation of the integers in the input arrays. This ufunc implements the C/Python operator ^.
Numpy arguments out, where, casting, order, subok, signature, and extobj are not supported.
x1 (Tensor) – Input array.
x2 (Tensor) – Input array. Only integer and boolean types are handled. If
x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).
mindspore.dtype, optional) – defaults to None. Overrides the dtype of the output Tensor.
Tensor or scalar, this is a scalar if both x1 and x2 are scalars.
- Supported Platforms:
>>> import mindspore.numpy as np >>> print(np.bitwise_xor(13, 17)) 28