scipy: BUG: Cannot get rid of Deprecation Warning with cKDTreeNode
Describe your issue.
Cannot get ride of Deprecation Warning with cKDTreeNode As cKDTreeNode is not exposed at the root of scipy.spatial
Reproducing Code Example
import scipy.spatial.ckdtree
scipy.spatial.ckdtree.cKDTree() # fixable!
scipy.spatial.ckdtree.cKDTreeNode() # not fixable!
# to fix it,as the Deprecation Warning states
import scipy.spatial
scipy.spatial.cKDTree() # fixes it!
scipy.spatial.cKDTreeNode() # errors out
The problem is that cKDTreeNode is not exposed in scipy.spatial
python -c "import scipy.spatial; print( scipy.spatial.cKDTreeNode )"
AttributeError: module 'scipy.spatial' has no attribute 'cKDTreeNode'
Error message
DeprecationWarning: Please use `cKDTree` from the `scipy.spatial` namespace, the `scipy.spatial.ckdtree` namespace is deprecated.
DeprecationWarning: Please use `cKDTreeNode` from the `scipy.spatial` namespace, the `scipy.spatial.ckdtree` namespace is deprecated.
SciPy/NumPy/Python version information
1.9.1 1.23.3 sys.version_info(major=3, minor=9, micro=13, releaselevel=‘final’, serial=0)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (9 by maintainers)
Sure, but I will need to get up to speed on how to submit a PR first 😃 Maybe is the my time to get into open source software contributions after all…
as an information, I am using that class (cKDTreeNode), as it is returned by the code, so I am doing type checking. I checked and cKDTreeNode is not derived from cKDTree, otherwise I would just used cKDTree.