Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Robert Kern
Christopher Barker wrote: > Yes, the docs could be clearer (and thanks Ann, that's better), but I'm > not sure that's the core problem > >> +If x and y are not given, condition.nonzero() is returned. This has >> +the effect of returning a tuple suitable for fancy indexing. > > Why i

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Christopher Barker
Yes, the docs could be clearer (and thanks Ann, that's better), but I'm not sure that's the core problem > +If x and y are not given, condition.nonzero() is returned. This has > +the effect of returning a tuple suitable for fancy indexing. Why is this a special case of where? This j

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Anne Archibald
On 12/09/2007, Robert Kern <[EMAIL PROTECTED]> wrote: > That sentence applies to the 3-argument form, which has nothing to do with > nonzero() and does not yield a tuple. But in general, yes, the docstring > leaves > much to be desired. Well, here's what I hope is a step in the right direction.

Re: [Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Robert Kern
Fernando Perez wrote: > Hi all, > > A couple of times I've been confused by numpy.where(), and I think > part of it comes from the docstring. Searching my gmail archive seems > to indicate I'm not the only one bitten by this. > > Compare: > > In [14]: pdoc numpy.where > Class Docstring: > w

[Numpy-discussion] Docstring improvements for numpy.where?

2007-09-12 Thread Fernando Perez
Hi all, A couple of times I've been confused by numpy.where(), and I think part of it comes from the docstring. Searching my gmail archive seems to indicate I'm not the only one bitten by this. Compare: In [14]: pdoc numpy.where Class Docstring: where(condition, | x, y) The result is s