Skip to content

small updates related to numpydoc #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions doc/HOWTO_DOCUMENT.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,26 @@ A Guide to NumPy/SciPy Documentation
For an accompanying example, see `example.py
<http://github.com/numpy/numpy/blob/master/doc/example.py>`_.

When using `Sphinx <http://sphinx.pocoo.org/>`_ in combination with the numpy
conventions, you may be interested in the ``numpydoc`` extension, which will
handle your docstrings correctly. For example, it will extract the
``Parameters`` section from your docstring and convert this into a field list.
It can also help alleviate reStructuredText errors encounterde when using
plain sphinx. Sphinx gets confused because the numpy docstrings have section
headers (e.g. ``-------------``) which sphinx does not expect to find in
docstrings.

It is available from:

* `numpydoc on PyPI <http://pypi.python.org/pypi/numpydoc>`_
* `numpydoc on GitHub (in main numpy repository)
<https://github.com/numpy/numpy/blob/master/doc/sphinxext/numpydoc.py>`_

Details of how to use it can be found `here
<https://github.com/numpy/numpy/blob/master/doc/sphinxext/README.txt>`_ and
`here
<https://github.com/numpy/numpy/blob/master/doc/HOWTO_BUILD_DOCS.rst.txt>`_

Overview
--------
In general, we follow the standard Python style conventions as described here:
Expand Down
2 changes: 1 addition & 1 deletion doc/sphinxext/numpydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- Renumber references.
- Extract the signature from the docstring, if it can't be determined otherwise.

.. [1] http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines#docstring-standard
.. [1] https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt

"""

Expand Down