[Numpy-discussion] help vectorizing something

Mathew Yeates mat.yeates@gmail....
Fri Oct 24 16:48:55 CDT 2008

I  have 2 vectors A and B. For each value in A I want to find the location
in B of the same value. Both A and B have unique elements.

Of course I could something like
For each index of A:
       v =A[index]
       location = numpy.where(B == v)

But I have very large lists and it will take too long.

Thanks to any one of you  vectorization gurus that has any ideas.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20081024/bcff5eb2/attachment-0001.html 

More information about the Numpy-discussion mailing list