I have searched high and low and just cant find a way to do it (Its possible i was searching for the wrong terms.)
I would like to create a mask (eg [True False Fal
Accepted answer is right but currently numpy's docs recommend using isin function instead of in1d
numpy
in1d
Use numpy.in1d():
In [6]: np.in1d(a, [14, 16, 18]) Out[6]: array([False, False, False, True, False, True, False], dtype=bool)