[Numpy-discussion] Proposal: scipy.spatial
Wed Oct 1 04:41:54 CDT 2008
2008/10/1 Gael Varoquaux <firstname.lastname@example.org>:
> On Tue, Sep 30, 2008 at 06:10:46PM -0400, Anne Archibald wrote:
>> > k=None in the third call to T.query seems redundant. It should be
>> > possible do put some logics so that the call is simply
>> > distances, indices = T.query(xs, distance_upper_bound=1.0)
>> Well, the problem with this is that you often want to provide a
>> distance upper bound as well as a number of nearest neighbors.
> Absolutely. I just think k should default to None, when
> distance_upper_bound is specified. k=None could be interpreted as k=1
> when distance_uppper_bound is not specified.
That seems very confusing. Better perhaps to have a function
query_all_neighbors, even if it's just a wrapper.
More information about the Numpy-discussion