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

Sturla Molden sturla@molden...
Mon Jul 16 13:08:31 CDT 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.


More information about the SciPy-Dev mailing list