[SciPy-User] KDTree count_neighbors
Fri Jul 2 15:35:31 CDT 2010
On Fri, Jul 2, 2010 at 1:25 PM, Anne Archibald
> The count_neighbors function is designed to compare close neighbors
> between two trees, not between one tree and one point or one tree and
> one array of points. I think the fastest way to get what you want is
> to just query for the neighbors and take the length of the resulting
> list. You could also try putting your query point (or points) into a
> KDtreel; if you have many query points this will be much faster.
Oh, that sounds interesting. So I build one tree for the data and
another tree for the query points? (For each query point I want to
find the k nearest neighbors in the data tree). What's the next step?
More information about the SciPy-User