Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proximal_neighbor is not returning the nearest points and shows ValueError #12

Open
Sadabrata opened this issue Jun 24, 2020 · 1 comment
Labels
question Further information is requested

Comments

@Sadabrata
Copy link

Sadabrata commented Jun 24, 2020

KDTree.proximal_neighbor(tree2, (3,4,11), d=9)
the above line raises the following value error
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Screenshot from 2020-06-25 00-26-49

I tried changing d and it seems as long as d < (distance between the point and a node) the code runs perfectly, but when d > (distance between the point and a node) that is when the required point has actual nearest neighbours, the given error is encountered.

@Sadabrata Sadabrata added the question Further information is requested label Jun 24, 2020
@Amir-m-a
Copy link

replace with if dist <= d and not np.array_equal(point, self.value)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants