kdtree icon indicating copy to clipboard operation
kdtree copied to clipboard

A Python implementation of a kd-tree

Results 10 kdtree issues
Sort by recently updated
recently updated
newest added

Is it possible to update the node payload? my goal is to use it like some sort of a database.

Adds the distances also with the point itself during calls of search_knn_dist. Calculating distances of each of the nodes again is redundant. If one doesn't need the distances, they can...

How does this implementation compare in benchmarks to scipy.spatial.cKDTree or sklearn.neighbors.KDTree and is it capable of querying all neighbors within a radius?

I've extended this library for a project I'm doing and figured I'd upstream the changes. It's nothing special - just some basic orthogonal range searching. Given two points, the function...

In `search_knn` and `search_nn`, the APIs have an arg named `dist`, and the API docs say >dist is a distance function, expecting two points and returning distance value. Distance values...

Fix for #40. `dist` functions now need to expect an optional `axis` parameter for calculating the distance on a single axis.

Hi, Thanks for your repo. I'm wondering it is possible to add bucket kd-trees ? I found [Matlab code](https://www.mathworks.com/help/stats/kdtreesearcher.kdtreesearcher.html) of it. However, I need it in python. Thanks.

Sorry, this is a bit of a question rather than an issue. However.... I'd like to use the namedtuple example to store my points in the tree, but would also...

The two lines below, one requires dist to be euclidean distance, and the other requires it to be squared distance: https://github.com/stefankoegl/kdtree/blob/master/kdtree.py#L501 https://github.com/stefankoegl/kdtree/blob/master/kdtree.py#L508 And the `best` argument is not used https://github.com/stefankoegl/kdtree/blob/master/kdtree.py#L517