storpipfugl / pykdtree

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

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

Closed fengsky401 closed 4 years ago

fengsky401 commented 4 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 4 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.