I have to index an x and a y axis with a condition on an x axis. I tried using the np.where function like this:
x = data[:, 0]
y = data[:, 1]
y = y[np.where((x < 111) or (x > 125))]
x = x[np.where((x < 111) or (x > 125))]
But it prints the following error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I tried using np.all then like this:
x = data[:, 0]
y = data[:, 1]
y = y[np.all([(x < 111) or (x > 125)], axis = 0)]
x = x[np.all([(x < 111) or (x > 125)], axis = 0)]
But got the same error, am I doing the 'or' condition wrong? Thanks in advance.