matching elements of numeric arrays

2005-10-13 Thread daniel . neilson
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: a=array([2,4,6]) b=array([2,3,4,5,6]) i want a function match that does this: match(a,b) array([0,2,4]) i have something that works, but it involves

Re: matching elements of numeric arrays

2005-10-13 Thread Claudio Grondi
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED] 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: a=array([2,4,6]) b=array([2,3,4,5,6]) i want a function match that does this: match(a,b)

Re: matching elements of numeric arrays

2005-10-13 Thread Robert Kern
[EMAIL PROTECTED] wrote: 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: a=array([2,4,6]) b=array([2,3,4,5,6]) i want a function match that does this: match(a,b) array([0,2,4]) i have

Re: matching elements of numeric arrays

2005-10-13 Thread daniel . neilson
Thanks a lot. It was this equal.outer idea that I was missing. -- http://mail.python.org/mailman/listinfo/python-list