I'm curious about something on boolean indexing:
I know that you can operate with two [gt/lt] conditions, as in
in[1]: import numpy as np
in[2]: x = np.arrange(7)
in[3]: (x > 3) & (x < 6)
out[3]: array([False, False, False, False, True, True, False])
But I wonder if there is a way I can do the same with two "equals to" conditions, without resorting to a for loop, something like:
in[4]: x = np.arrange(7)
in[5]: (x == 3) & (x == 5)
out[5]: array([False, False, False, True, False, True, False]) #expected result#
(Learning python, sorry for wrong terms)