What is the difference between these two algorithms?
What is the difference between these two algorithms?
Currently, both have almost same APIs, and cKDTree is faster than KDTree.
So, In the near future, SciPy developers are planning to remove KDTree, and cKDTree will be renamed to KDTree in a backwards-compatible way.
Ref: Detailed SciPy Roadmap — SciPy v1.6.0.dev Reference Guide https://docs.scipy.org/doc/scipy/reference/roadmap-detailed.html#spatial
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.