Re: [Numpy-discussion] Fast function application on list of 2D points?

2009-01-13 Thread Eric LEBIGOT
and y coordinates. For example the code > below applies filter only to the values that have x coordinate bigger > than 0.7 and y coordinate smaller than 0.3: > >mask = numpy.logical_and(points[:,0] > 0.7, points[:,1] < 0.3) >points = numpy.apply_along_axis(filter, axis = 1, ar

[Numpy-discussion] Fast function application on list of 2D points?

2009-01-12 Thread Eric LEBIGOT
Hello, What is the fastest way of applying a function on a list of 2D points? More specifically, I have a list of 2D points, and some do not meet some criteria and must be rejected. Even more specifically, the filter only lets through points whose x coordinate satisfies some condition, _and_