logical_not

logical_not(x: array, /) array

Computes the logical NOT for each element x_i of the input array x.

Note

While this specification recommends that this function only accept input arrays having a boolean data type, specification-compliant array libraries may choose to accept input arrays having real-valued data types. If non-boolean data types are supported, zeros must be considered the equivalent of False, while non-zeros must be considered the equivalent of True.

Parameters:

x (array) – input array. Should have a boolean data type.

Returns:

out (array) – an array containing the element-wise results. The returned array must have a data type of bool.