mindspore.numpy.bitwise_xor
- mindspore.numpy.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 ^.
Note
Numpy arguments out, where, casting, order, subok, signature, and extobj are not supported.
- Parameters
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).dtype (
mindspore.dtype
, optional) – Defaults to None. Overrides the dtype of the output Tensor.
- Returns
Tensor or scalar, this is a scalar if both x1 and x2 are scalars.
- Supported Platforms:
Ascend
Examples
>>> import mindspore.numpy as np >>> print(np.bitwise_xor(13, 17)) 28