[Numpy-discussion] docstring suggestions

David Goldsmith d.l.goldsmith@gmail....
Fri Feb 12 12:19:41 CST 2010


2010/2/12 Hans Meine <meine@informatik.uni-hamburg.de>

> On Friday 12 February 2010 13:43:56 Hans Meine wrote:
> > I was just looking for numpy.ma.compressed, but forgot its name.
>

Fixed this one in the Wiki.


> Another strange thing is the docstring of numpy.ma.compress, which appears
> in
> ipython like this:
>
> Type:           instance
> Base Class:     numpy.ma.core._frommethod
> [...]
> Docstring:
>    compress(self, condition, axis=None, out=None)
>
>    Return `a` where condition is ``True``.
> [...]
>    Parameters
>    ----------
>    condition : var
> [...]
>    axis : {None, int}, optional
> [...]
>    out : {None, ndarray}, optional
> [...]
> Call def:       numpy.ma.compress(self, a, *args, **params)
>
> Note the `self` vs. `a` problem, as well as the "call def" which has both,
> but
> no condition anymore.  And `a`/self does not appear under parameters.
>

Uncertain how to fix this one - is it a "bug" in how the docstring is
interpreted somewhere along the line?

DG

PS: please, if you don't mind, in the future post docstring "complaints" at
scipy-dev (numpy-discussion has many more subscribers, many of whom probably
don't immediately care about any particular docstring problem, whereas
anyone who is working on the docstrings is - hopefully - subscribed to
scipy-dev); thanks.


> All these problems are probably related to numpy.ma.core._frommethod, but
> anyhow this looks wrong from a user's POV.
>
> HTH,
>   Hans
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100212/9b59f2c6/attachment.html 


More information about the NumPy-Discussion mailing list