stefankoegl / kdtree

A Python implementation of a kd-tree
ISC License
365 stars 118 forks source link

search_nn does not take "best" parameter into consideration #20

Closed dalippa closed 8 years ago

dalippa commented 10 years ago
@require_axis
def search_nn(self, point, best=None):
    """
    Search the nearest node of the given point

    point must be a location, not a node. The nearest node to the point is
    returned. If a location of an actual node is used, the Node with this
    location will be retuend (not its neighbor) """

    return next(iter(self.search_knn(point, 1)), None)

The code for search_nn should probably pass "best" on to its call to search_knn

stefankoegl commented 10 years ago

Where do you have this code snippet from? The current codebase looks different.

dalippa commented 10 years ago

This is from 0.8.1 and 0.9:

https://github.com/stefankoegl/kdtree/blob/v0.9/kdtree.py

stefankoegl commented 9 years ago

I have just released kdtree 0.10, so I assume this is no longer relevant. Can you please verify?

dalippa commented 9 years ago

I'll take a look when I get into work next week.

stefankoegl commented 8 years ago

Closing due to inactivity. If this is still relevant, please reopen.