The python numpy.where() works as follows:-
Any sort of logical operation on a numpy array returns a boolean array. (i.e. __gt__, __lt__, etc all return boolean arrays where the given condition is true).
Example:-
x = np.arange(9).reshape(3,3)
print x > 5
To know more about this you can have a look at the following video tutorial:-