Open
Description
Describe the workflow you want to enable
I would like to be able to query nearest points within a Balltree but excluding some of them.
E.g. I create a Balltree on 60k points. I want to find the k nearest neighbour points but within a subset of the 60k points.
Example case: I have N clusters of points. I build a Balltree with all the points of the N clusters (e.g. 60k points). Then I want to find for each of the points of a given cluster the closest point from the other clusters (i.e. excluding itself).
Describe your proposed solution
I would like to pass an extra mask argument (e.g. array of 60k elements) to the query with True for the points in the other clusters and False for the points in the specific cluster.
Describe alternatives you've considered, if relevant
No response
Additional context
No response