bitwise_invert

bitwise_invert(x: array, /) array

Inverts (flips) each bit for each element x_i of the input array x.

Parameters:

x (array) – input array. Should have an integer or boolean data type.

Returns:

out (array) – an array containing the element-wise results. The returned array must have the same data type as x.