Re: [Numpy-discussion] searchsorted for exact matches, not preserving order

2009-09-11 Thread Robert Kern
On Fri, Sep 11, 2009 at 15:46, Andrew Jaffe wrote: > On 11/09/2009 08:33, Robert Kern wrote: >> On Fri, Sep 11, 2009 at 10:24, Andrew Jaffe  wrote: >>> Dear all, >>> >>> I've got two (integer) arrays, and I want to find the indices in the >>> first one that have entries in the second. I.E. I want a

Re: [Numpy-discussion] searchsorted for exact matches, not preserving order

2009-09-11 Thread Andrew Jaffe
On 11/09/2009 08:33, Robert Kern wrote: > On Fri, Sep 11, 2009 at 10:24, Andrew Jaffe wrote: >> Dear all, >> >> I've got two (integer) arrays, and I want to find the indices in the >> first one that have entries in the second. I.E. I want all idx s.t. >> there exists a j with a[idx]=b[j]. Here is

Re: [Numpy-discussion] searchsorted for exact matches, not preserving order

2009-09-11 Thread Robert Kern
On Fri, Sep 11, 2009 at 10:24, Andrew Jaffe wrote: > Dear all, > > I've got two (integer) arrays, and I want to find the indices in the > first one that have entries in the second. I.E. I want all idx s.t. > there exists a j with a[idx]=b[j]. Here is my current implementation > (with a = pixnums, b

[Numpy-discussion] searchsorted for exact matches, not preserving order

2009-09-11 Thread Andrew Jaffe
Dear all, I've got two (integer) arrays, and I want to find the indices in the first one that have entries in the second. I.E. I want all idx s.t. there exists a j with a[idx]=b[j]. Here is my current implementation (with a = pixnums, b=surveypix) import numpy as np def matchPix(pixnums, surve