[Numpy-discussion] extract elements of an array that are contained in another array?
Alan G Isaac
aisaac at american.edu
Thu Jun 4 08:23:43 EDT 2009
a[(a==b[:,None]).sum(axis=0,dtype=bool)]
hth,
Alan Isaac
More information about the NumPy-Discussion
mailing list