[Numpy-discussion] filtering numeric arrays

Gordon Williams g_will at cyberus.ca
Thu Feb 27 11:05:10 CST 2003

Hi All,

I have an 2D numeric array of x,y points eg [(1,3),(2,4),(5,6)] and I would
like to remove all the points in the array that don't meet the min/max point
criteria.  I will have several thousand points.  With lists I can do it like

[(x,y) for x,y in seq if xMin < x <xMax and yMin< y <yMax]

How do I get the same functionality and better speed using numeric.  I have
tried a bunch of things using compress and take but I am running up against
a brick wall.

Any ideas?


Gordon Williams

More information about the Numpy-discussion mailing list