[Numpy-discussion] Why are ufunc docstrings useless?

Robert Kern robert.kern@gmail....
Thu May 8 22:16:18 CDT 2008

On Thu, May 8, 2008 at 10:12 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
> 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.

Ah good. I didn't realize it would handle builtin type methods.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

More information about the Numpy-discussion mailing list