Geometry/kdtree.py
In function nearest_neighbor() the distance function used is self.dist(), instead of the passed-in function, which should just be called as dist().
Using self.dist() ends up always using the dist function defined in kdtree.py, and not the function passed in. PointKdtree::Point() tries to pass a distance function when calling kdtree::nearest_neighbor(), but it doesn't get used because of the problem just mentioned.
So just delete "self." in the two places where self.dist() appears in kdtree::nearest_neighbor().
patch file
Hi anonymous,
thanks for sharing this! Indeed the optional parameter was ignored before.
I committed the change that you suggested as r657.
thanks!
Lars
The speed of advancement has been a shock, says Dr Dre. "I experienced no approach when we begun that it would get this substantial." [url=http://cheapdrdrebeatssolo.webs.com/]cheap beats by dre[/url] <a href="http://cheapdrdrebeatssolo.webs.com/" title="cheap beats by dre">cheap beats by dre</a>