[SciPy-Dev] removing pure python KDTree implementation

Ralf Gommers ralf.gommers at gmail.com
Sun Feb 21 06:05:31 EST 2016


Hi all,

For a long time we've had both a Python (KDTree) and a Cython/C++ (cKDTree)
version of a k-d tree structure in scipy.spatial. The cKDTree version
reached feature-parity with KDTree in 0.12.0, and new features are being
added regularly now. So keeping the orders of magnitude slower pure Python
version seems to be a bit pointless - only adds to a maintenance burden and
to giving users an unnecessary choice to make.

So proposal: remove the pure Python code and make KDTree an alias for
cKDTree. This can be done straight away.

For the future it may also be desirable to get rid of the duplicate name.
The issue then is which one to keep. KDTree is nicer, but it would require
users who have picked the fast version now to change their code. So maybe
just deprecate one in documentation, but keep both names working?

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20160221/c6bcc966/attachment.html>


More information about the SciPy-Dev mailing list