diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/doc/HOWTO_DOCUMENT.txt | 14 | ||||
-rw-r--r-- | numpy/doc/example.py | 10 |
2 files changed, 20 insertions, 4 deletions
diff --git a/numpy/doc/HOWTO_DOCUMENT.txt b/numpy/doc/HOWTO_DOCUMENT.txt index 1bb0bf446..8b4cb11fe 100644 --- a/numpy/doc/HOWTO_DOCUMENT.txt +++ b/numpy/doc/HOWTO_DOCUMENT.txt @@ -98,7 +98,7 @@ will break doctest.) You can run the tests by doing:: Common reST concepts -------------------- -A reST-documented module should define +A reST-documented module should define:: __docformat__ = 'restructuredtext en' @@ -118,9 +118,15 @@ for non-latex math. A more extensive example of reST markup can be found here: http://docutils.sourceforge.net/docs/user/rst/demo.txt -An example follows. Line spacing and indentation are significant and should +Line spacing and indentation are significant and should be carefully followed. +Here is a short example in plain text: +http://svn.scipy.org/svn/numpy/trunk/numpy/doc/example.py +Here is the rendered version of that file: +http://www.scipy.org/scipy/numpy/wiki/RenderedExample + + Using Epydoc ------------ @@ -149,8 +155,8 @@ changed by inserting something like:: The first line of the signature should **not** copy the signature unless the function is written in C, in which case it is mandatory. If the function -signature is generic (uses *args or **kwds), then a function signature may be -included. +signature is generic (uses ``*args`` or ``**kwds``), then a function signature +may be included. Use optional in the "type" field for parameters that are non-keyword optional for C-functions. diff --git a/numpy/doc/example.py b/numpy/doc/example.py index cb5c24690..80da1edeb 100644 --- a/numpy/doc/example.py +++ b/numpy/doc/example.py @@ -1,3 +1,13 @@ +"""This is the docstring for the example.py module. Modules names should +have short, all-lowercase names. The module name may have underscores if +this improves readability. + +Every module should have a docstring at the very top of the file. The +module's docstring may extend over multiple lines. If your docstring does +extend over multiple lines, the closing three quotation marks must be on +a line by itself, preferably preceeded by a blank line. + +""" __docformat__ = "restructuredtext en" |