matching elements of numeric arrays

daniel.neilson at daniel.neilson at
Thu Oct 13 23:31:36 CEST 2005

I have two one-dimensional Numeric arrays, and I need to know the
indices in the second array of elements from the first.

so if i had:


i want a function match that does this:

>>> match(a,b)

i have something that works, but it involves converting things to lists
and using 'in', and it is rather slow. if someone could point me to a
better solution, i would appreciate it.

More information about the Python-list mailing list