dpnp.logical_xor
- dpnp.logical_xor(x1, x2, out=None, **kwargs)[source]
Compute the truth value of x1 XOR x2, element-wise.
For full documentation refer to
numpy.logical_xor.Limitations
Input arrays are supported as
dpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types. Parameteroutis supported only with default valueNone. Parameterwhereis supported only with default valueTrue.See also
dpnp.logical_andCompute the truth value of x1 AND x2 element-wise.
dpnp.logical_orCompute the truth value of x1 OR x2 element-wise.
dpnp.logical_notCompute the truth value of NOT x element-wise.
dpnp.bitwise_xorCompute the bit-wise XOR of two arrays element-wise.
Examples
>>> import dpnp as np >>> x1 = np.array([True, True, False, False]) >>> x2 = np.array([True, False, True, False]) >>> out = np.logical_xor(x1, x2) >>> [i for i in out] [False, True, True, False]