[Numpy-discussion] huge array calculation speed
Charles R Harris
Sat Jul 12 19:39:00 CDT 2008
On Fri, Jul 11, 2008 at 11:04 AM, Lou Pecora <firstname.lastname@example.org> wrote:
> If your positions are static (I'm not clear on that from your message),
> then you might want to check the technique of "slice searching". It only
> requires one sort of the data for each dimension initially, then uses a
> simple, but clever look up to find neighbors within some epsilon of a chosen
> point. Speeds appear to be about equal to k-d trees. Programming is vastly
> simpler than k-d trees, however.
This one is actually easy to implement in numpy using argsort. I'm not sure
how much speed the integer comparisons buy as opposed to straight floating
comparisons; they probably did it that way for the hardware implementation.
It might be interesting to make a comparison.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion