[Numpy-discussion] Adding new functions to Numpy
Sat Jul 18 08:45:13 CDT 2009
On Fri, Jul 17, 2009 at 4:11 AM, Pauli Virtanen<email@example.com> wrote:
> On 2009-07-16, David Cournapeau <firstname.lastname@example.org> wrote:
>> Hi Pauli,
>> On Sat, Jul 4, 2009 at 9:59 PM, Pauli Virtanen<email@example.com> wrote:
>>> 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.
Ok, that's better than nothing for the time being. I would really like
to have a plugin to have autodoc for C code as well as python code,
though. One more thing on the TODO list :)
More information about the NumPy-Discussion