pep257 & numpydoc conforming docstrings

This commit is contained in:
xantares 2015-04-13 11:15:18 +02:00 committed by William S Fulton
commit 92328a2016
4 changed files with 156 additions and 124 deletions

View file

@ -5273,8 +5273,8 @@ def function_name(*args, **kwargs):
<p>
Level "2" results in the function prototype as per level "0". In addition, a line of
documentation is generated for each parameter. Using the previous example, the generated
code will be:
documentation is generated for each parameter using <a href="https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt">numpydoc</a> style.
Using the previous example, the generated code will be:
</p>
<div class="targetlang">
@ -5283,11 +5283,12 @@ def function_name(*args, **kwargs):
"""
function_name(x, y, foo=None, bar=None) -&gt; bool
Parameters:
x: int
y: int
foo: Foo *
bar: Bar *
Parameters
----------
x: int
y: int
foo: Foo *
bar: Bar *
"""
...
@ -5318,11 +5319,12 @@ def function_name(*args, **kwargs):
"""
function_name(x, y, foo=None, bar=None) -&gt; bool
Parameters:
x (C++ type: int) -- Input x dimension
y: int
foo: Foo *
bar: Bar *
Parameters
----------
x (C++ type: int) -- Input x dimension
y: int
foo: Foo *
bar: Bar *
"""
</pre>
@ -5341,11 +5343,12 @@ def function_name(*args, **kwargs):
"""
function_name(int x, int y, Foo foo=None, Bar bar=None) -&gt; bool
Parameters:
x: int
y: int
foo: Foo *
bar: Bar *
Parameters
----------
x: int
y: int
foo: Foo *
bar: Bar *
"""
...