[Numpy-discussion] Proposal: scipy.spatial

Gael Varoquaux gael.varoquaux@normalesup....
Wed Oct 1 00:26:26 CDT 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,


More information about the Numpy-discussion mailing list