[Numpy-discussion] Why are ufunc docstrings useless?

Charles R Harris charlesr.harris@gmail....
Thu May 8 22:12:03 CDT 2008

On Thu, May 8, 2008 at 9:07 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On Thu, May 8, 2008 at 9:52 PM, Anne Archibald
> <peridot.faceted@gmail.com> wrote:
> > Thanks! Done add, reduce, outer, and reduceat. What about __call__?
> If anyone knows enough to explicitly request a docstring from
> __call__, they already know what it does.
> --

It's easier/better to do this in numpy/add_newdocs.py. For example:

In [14]: from  numpy.lib import add_newdoc as add

In [15]: add('numpy.core','ufunc',('reduce','hello world'))

In [16]: ufunc.reduce.__doc__
Out[16]: 'hello world'

You don't have to clutter up the c sources and you can use """ """, instead
of putting all those newlines in.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080508/a20c9d7d/attachment.html 

More information about the Numpy-discussion mailing list