[Numpy-discussion] Adding new functions to Numpy

Pauli Virtanen pav+sp@iki...
Thu Jul 16 14:11:06 CDT 2009

On 2009-07-16, David Cournapeau <cournape@gmail.com> wrote:
> Hi Pauli,
> On Sat, Jul 4, 2009 at 9:59 PM, Pauli Virtanen<pav+sp@iki.fi> wrote:
>> Hi,
>> When you add new functions to Numpy, please include
>>    .. versionadded:: 1.4.0
> What is the best way to do this in the reference guide directly as
> well (for C API). For example, I added the function npy_copysign for
> 1.4.0, documented in the c-api.coremath.rst, but I don't know where to
> put the versionadded.

In the Python docs, the versionadded:: typically is the last item 
inside the function:: directive.

> More generally, I would like to follow our
> docstring format when  documenting C functions, but how can I put the
> different sections in there (Parameters, Notes, etc...)

Yeah, currently there's no way to do that. I can probably add 
numpy*function/cfunction/... etc. directives that allow this.

An alternative is to use

	.. rubric:: Notes

to make the headings to appear.

Pauli Virtanen

More information about the NumPy-Discussion mailing list