Difference between scipy.spatial.KDTree and scipy.spatial.cKDTree

Viewed 11540

What is the difference between these two algorithms?

4 Answers

Update 2022: cKDTree is deprecated

The current (v1.8) SciPy documentation states that scipy.spatial.cKDTree is now deprecated and was replaced by the functionally-identical scipy.spatial.KDTree.

Here is the note:

cKDTree is functionally identical to KDTree. Prior to SciPy v1.6.0, cKDTree had better performance and slightly different functionality but now the two names exist only for backward-compatibility reasons. If compatibility with SciPy < 1.6 is not a concern, prefer KDTree.

Related