filtering numeric arrays
Marie-Claude Savoie
marie-claude.savoie at sympatico.ca
Thu Feb 27 12:34:16 EST 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?
Thanks
Gordon Williams
More information about the Python-list
mailing list