dpnp.logical_not

dpnp.logical_not(x1, out=None, **kwargs)[source]

Compute the truth value of NOT x element-wise.

For full documentation refer to numpy.logical_not.

Limitations

Input array is supported as dpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types. Parameter out is supported only with default value None. Parameter where is supported only with default value True.

See also

dpnp.logical_and

Compute the truth value of x1 AND x2 element-wise.

dpnp.logical_or

Compute the truth value of x1 OR x2 element-wise.

dpnp.logical_xor

Compute the truth value of x1 XOR x2, element-wise.

Examples

>>> import dpnp as np
>>> x = np.array([True, False, 0, 1])
>>> out = np.logical_not(x)
>>> [i for i in out]
[False, True, True, False]