[Numpy-discussion] Current ufunc signatures for review
Charles R Harris
Sun May 25 13:55:52 CDT 2008
On Sun, May 25, 2008 at 12:42 PM, Pauli Virtanen <email@example.com> wrote:
> su, 2008-05-25 kello 12:12 -0600, Charles R Harris kirjoitti:
> > 1) Help strings on ufuncs don't work. This seems to be a problem with the
> help function, as
> > printing the relevant __doc__ works fine. The docstrings are currently
> defined in
> > code_generators/generate_umath.py and add_newdoc doesn't seem to work
> for them.
> Yes, this is a problem with the help function. In pydoc.py in the Python
> standard library:
> def doc(...):
> if not (inspect.ismodule(object) or
> inspect.isclass(object) or
> inspect.isroutine(object) or
> inspect.isgetsetdescriptor(object) or
> inspect.ismemberdescriptor(object) or
> isinstance(object, property)):
> # If the passed object is a piece of data or an instance,
> # document its available methods instead of its value.
> object = type(object)
> Is it possible to make one of the above conditions True for ufuncs?
I don't see why not, we could have numpy.doc. Hmm, it should probably be
changed in ipython also. Something like
In : isinstance(sin, numpy.ufunc)
might do the trick.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion