Invert binary numpy array

is there a kind of "logical no" for numpy arrays (of numbers of course).

For example, consider this array: x = [1,0,1,0,0,1]

i am looking for an easy way to compute its "inverse" y = [0,1,0,1,1,0]

#python #numpy

2 Likes4.40 GEEK