[SciPy-Dev] cKDTree deprecation?

Andras Deak deak.andris at gmail.com
Sat Mar 13 10:57:27 EST 2021


Hi All,

I ran into the doc issue that there's no guidance to choose between
`KDTree` and `cKDTree` in spatial (in either docstrings or at
https://docs.scipy.org/doc/scipy/reference/spatial.html#nearest-neighbor-queries).
I plan to fix this in the documentation, but from the brief feedback I
got when I asked on a related issue [1] I wonder if we should do more?

As of November 2020 [2] the two classes have identical APIs, and
`KDTree` seems to be a thin wrapper around `cKDTree`. The long-term
plan is to remove the `cKDTree` name. Should we take steps now to
deprecate `cKDTree`? I don't know if anything else is needed for
proper deprecation, and it also seems to me that
`PendingDeprecationWarning`s are not a thing in scipy. At least we
should add a note that says that `cKDTree` might be removed in a
future version.
Cheers,

András

[1]: https://github.com/scipy/scipy/issues/8923#issuecomment-796924434
[2]: https://github.com/scipy/scipy/pull/12852


More information about the SciPy-Dev mailing list