[Numpy-discussion] Proposal: scipy.spatial

Gael Varoquaux gael.varoquaux at normalesup.org
Wed Oct 1 01:26:26 EDT 2008


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.

My 2 cents,

Gaël



More information about the NumPy-Discussion mailing list