Python-KD-Tree
Python-KD-Tree copied to clipboard
fix when points are np.ndarray (without numpy dependency
fix sort with np.ndarray fix warning 'np.bool_' scalars to be interpreted as an index
I don't think this solution works as the ndarray sorting is still glitchy
File ~/kd_tree.py:48, in KDTree.__init__.<locals>.make(points, i)
46 i = (i + 1) % dim
47 m = len(points) >> 1
...
---> 45 points.sort(axis=i) # np.ndarray
46 i = (i + 1) % dim
47 m = len(points) >> 1
AxisError: axis 2 is out of bounds for array of dimension 2