Multiple conditions with numpy.where
08 July 2018
Using numpy and the numpy.where function is very powerfull. If you want to use several conditions with np.where you have to use the bitwise-AND-operator to combine to different conditions in one query. Of course you can also use the bitwise OR-operator too.
daten = np.random.rand(50,5)
sel = np.where((daten[:,0]==5) & (daten[:,1]< 17))[0]
plt.scatter(daten[sel,3], daten[sel,4])