[Numpy-discussion] Why are ufunc docstrings useless?
Thu May 8 21:52:08 CDT 2008
2008/5/8 Robert Kern <email@example.com>:
> On Thu, May 8, 2008 at 5:28 PM, Anne Archibald
> <firstname.lastname@example.org> wrote:
>> I frequently use functions like np.add.reduce and np.add.outer, but
>> their docstrings are totally uninformative. Would it be possible to
>> provide proper docstrings for these ufunc methods? They need not be
>> specific to np.add; just an explanation of what arguments to give (for
>> example) reduce() (presumably it takes an axis= argument? what is the
>> default behaviour?) and what it does would help.
> Sure. The place to add them would be in the PyMethodDef ufunc_methods
> array on line 3953 of numpy/core/src/ufuncobject.c. Just extend each
> of the rows with a char* containing the docstring contents. A literal
> "string" will suffice.
Thanks! Done add, reduce, outer, and reduceat. What about __call__?
More information about the Numpy-discussion