[SciPy-Dev] Enhancements to scipy.spatial.cKDTree

Sturla Molden sturla at molden.no
Mon Jul 16 14:08:31 EDT 2012


Den 16.07.2012 02:00, skrev Patrick Varilly:
>
> That said, now that the initial effort is complete, it's obvious that 
> a clear pattern recurs in the kd-tree walking algorithms: keeping 
> incremental track of the minimum/maximum distances between two 
> hyperrectangles as they're successively split (alternatively, a 
> hyperrectangle and a point).  If that primitive is abstracted, the 
> code becomes a lot more readable again.

Yes, that was much better :-)
+1 for doping it like this (even if there is a small speed penalty).

We might even do this to the original cKDTree.query function as well.

Sturla





More information about the SciPy-Dev mailing list