[Numpy-discussion] Finding values in an array

Alexander Belopolsky ndarray at mac.com
Thu Nov 27 22:15:41 EST 2014

I probably miss something very basic, but how given two arrays a and b, can
I find positions in a where elements of b are located?  If a were sorted, I
could use searchsorted, but I don't want to get valid positions for
elements that are not in a.  In my case, a has unique elements, but in the
general case I would accept the first match.  In other words, I am looking
for an array analog of list.index() method.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141127/c6f43be1/attachment.html>

More information about the NumPy-Discussion mailing list