[Numpy-discussion] docstring suggestions

Hans Meine meine@informatik.uni-hamburg...
Fri Feb 12 07:14:38 CST 2010

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

Another strange thing is the docstring of numpy.ma.compress, which appears in 
ipython like this:

Type:           instance
Base Class:     numpy.ma.core._frommethod
    compress(self, condition, axis=None, out=None)

    Return `a` where condition is ``True``.
    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.

All these problems are probably related to numpy.ma.core._frommethod, but 
anyhow this looks wrong from a user's POV.


More information about the NumPy-Discussion mailing list