storpipfugl / pykdtree

Fast kd-tree implementation in Python
GNU Lesser General Public License v3.0
221 stars 46 forks source link

How to set distance_upper_bound as in scipy.spatial.cKDtree? #46

Closed fengsky401 closed 4 years ago

fengsky401 commented 5 years ago

I use scipy.spatial.cKDtree as below: d1_tree = cKDTree(descriptors1) , indices = d1_tree.query(descriptors_2, distance_upper_bound=_DISTANCE_THRESHOLD)

How can I implement the same function in pykdtree?

djhoese commented 5 years ago

What you have above looks like it should work. Are you getting an error?

Here's the docstring for the query method:

https://github.com/storpipfugl/pykdtree/blob/18d95a2e9aaad30b203dc8092ddd24c0bdd0d58a/pykdtree/kdtree.pyx#L134-L159

mraspaud commented 4 years ago

Closing due to inactivity.