storpipfugl / pykdtree

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

Difficulty of adding other query methods available in scipy KDTree #41

Open djhoese opened 5 years ago

djhoese commented 5 years ago

Are there any plans to add the other query methods available in scipy's KDTree implementation? Is it possible with pykdtree's method? How difficult would it be and what kind of headaches could you imagine?

See the bottom of this page for a list of the query methods: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.cKDTree.html

storpipfugl commented 5 years ago

It wasn't something I had considered. Would it make an important difference to some known use cases or is it more nice to have compatibility? Looking at the scipy code there's some C++ code to make sense of but nothing complex just time consuming. There would also be a benchmarking effort to make sure scipy is defeated properly. The cKDTree implementations are not parallelized so that would have to be added (can be trivial or really difficult depending on implementation details)

djhoese commented 5 years ago

Good points. This was for use cases that @leouieda and I were discussing when he made a PR for his "verde" library that basically meant the user had to pick if they wanted a scipy or pykdtree KDTree based on what methods they may call in the future.

leouieda commented 5 years ago

Hi @storpipfugl, the PR that @djhoese mentioned is fatiando/verde#165. I mostly need query_ball_point as well but I could imagine needing some other methods in the future. I can run some benchmarks on my code if you need.