I was going through the “Numpy exercises.ipynb” file for practice and I got to the following problem:

##Given the X numpy array, get numbers equal to 2 or 10¶

X = np.array([-1, 2, 0, -4, 5, 6, 0, 0, -9, 10])

I have the solution but I was wondering why I was not able to use “or” and instead had to use “|” in my solution?

Thanks!