NumPy uses a custom Sphinx extension: https://pypi.python.org/pypi/numpydoc.
You can install it with
pip install numpydoc
and then you add it to the sphinx conf.py file by adding to the extensions list
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'numpydoc']
Answer from jkeesh on Stack OverflowSphinx
sphinx-doc.org › en › master › usage › extensions › example_numpy.html
Example NumPy Style Python Docstrings — Sphinx documentation
Attributes ---------- module_level_variable1 : int Module level variables may be documented in either the ``Attributes`` section of the module docstring, or in an inline docstring immediately following the variable. Either form is acceptable, but the two should not be mixed. Choose one convention to document module level variables and be consistent with it. .. _NumPy docstring standard: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard """ module_level_variable1 = 12345 module_level_variable2 = 98765 """int: Module level variable documented inline.
Sphinx
sphinx-doc.org › en › master › usage › extensions › napoleon.html
sphinx.ext.napoleon – Support for NumPy and Google style docstrings — Sphinx documentation
Napoleon is a pre-processor that parses NumPy and Google style docstrings and converts them to reStructuredText before Sphinx attempts to parse them.
Starred by 352 users
Forked by 177 users
Languages: Python 99.9% | Makefile 0.1%
Readthedocs
numpydoc.readthedocs.io › en › latest › format.html
Style guide — numpydoc v1.11.1.dev1+gca74aae44 Manual
If you have suggestions for improvements, post them on the numpy-discussion list. Our docstring standard uses re-structured text (reST) syntax and is rendered using Sphinx (a pre-processor that understands the particular documentation style we are using).
Readthedocs
numpydoc.readthedocs.io
numpydoc – Numpy’s Sphinx extensions — numpydoc v1.11.0rc1.dev0 Manual
These are shipped in this numpydoc package, in case you want to make use of them in third-party projects. The numpydoc extension provides support for the Numpy docstring format in Sphinx, and adds the code description directives np:function, np-c:function, etc.
NumPy
numpy.org › doc › 1.19 › docs › howto_document.html
A Guide to NumPy/SciPy Documentation — NumPy v1.19 Manual
When using Sphinx in combination with the numpy conventions, you should use the numpydoc extension so that your docstrings will be handled correctly. For example, Sphinx will extract the Parameters section from your docstring and convert it into a field list.
Sphinx Book Theme
sphinx-book-theme.readthedocs.io › en › stable › reference › api-numpy.html
NumPy docstrings - Sphinx Book Theme - Read the Docs
To see which functions are available in numpy, type np.<TAB> (where <TAB> refers to the TAB key), or use np.*cos*?<ENTER> (where <ENTER> refers to the ENTER key) to narrow down the list. To view the docstring for a function, use np.cos?<ENTER> (to view the docstring) and np.cos??<ENTER> (to view the source code).
Sphinx Book Theme
sphinx-book-theme.readthedocs.io › en › latest › reference › api-numpy.html
NumPy docstrings — Sphinx Book Theme
To see which functions are available in numpy, type np.<TAB> (where <TAB> refers to the TAB key), or use np.*cos*?<ENTER> (where <ENTER> refers to the ENTER key) to narrow down the list. To view the docstring for a function, use np.cos?<ENTER> (to view the docstring) and np.cos??<ENTER> (to view the source code).
NumPy
numpy.org › doc › 1.20 › docs › howto_document.html
A Guide to NumPy Documentation — NumPy v1.20 Manual
January 31, 2021 - When using Sphinx in combination with the numpy conventions, you should use the numpydoc extension so that your docstrings will be handled correctly. For example, Sphinx will extract the Parameters section from your docstring and convert it into a field list.
Bashtage
bashtage.github.io › sphinx-material › numpydoc.html
NumPy Docstrings — Material for Sphinx
This page shows how autosummary works with numpydoc and a NumPy-style docstring.
DataCamp
datacamp.com › tutorial › docstrings-python
Python Docstrings Tutorial : Examples & Format for Pydoc, Numpy, Sphinx Doc Strings | DataCamp
February 14, 2025 - In the table below, you can see a comparison of the different types of docstring formats we've mentioned above: Sphinx Style: Often used in large projects where comprehensive documentation is required. It integrates well with Sphinx's documentation generator.
Readthedocs
numpydoc.readthedocs.io › en › stable
numpydoc – Numpy’s Sphinx extensions — numpydoc v1.10.0 Manual
These are shipped in this numpydoc package, in case you want to make use of them in third-party projects. The numpydoc extension provides support for the Numpy docstring format in Sphinx, and adds the code description directives np:function, np-c:function, etc.
NumPy
numpy.org › doc › 1.18 › docs › howto_document.html
A Guide to NumPy/SciPy Documentation — NumPy v1.18 Manual
May 24, 2020 - When using Sphinx in combination with the numpy conventions, you should use the numpydoc extension so that your docstrings will be handled correctly. For example, Sphinx will extract the Parameters section from your docstring and convert it into a field list.
Bashtage
bashtage.github.io › sphinx-material › devel › numpydoc.html
NumPy Docstrings — Material for Sphinx - bashtage.github.io
This page shows how autosummary works with numpydoc and a NumPy-style docstring.
Readthedocs
sphinxcontrib-napoleon.readthedocs.io › en › latest › example_numpy.html
Example NumPy Style Python Docstrings - sphinx.ext.napoleon
Any special member with a docstring will be included in the output, if ``napoleon_include_special_with_doc`` is set to True. This behavior can be enabled by changing the following setting in Sphinx's conf.py:: napoleon_include_special_with_doc = True """ pass def __special_without_docstring__(self): pass def _private(self): """By default private members are not included.
Xarray
docs.xarray.dev › en › v0.2 › sphinxext › numpydoc › README.html
numpydoc – Numpy’s Sphinx extensions — xray 0.2.0 documentation
Numpy’s documentation uses several custom extensions to Sphinx. These are shipped in this numpydoc package, in case you want to make use of them in third-party projects. ... numpydoc: support for the Numpy docstring format in Sphinx, and add the code description directives np:function, np-c:function, etc.
Alwaysdata
bwanamarko.alwaysdata.net › napoleon › format_exception.html
NumPyDoc vs. Sphinx and Google Format — sphinxy 0.1 documentation
.. [2] `Sphinx <http://sphinx-doc.org/domains.html#domains>`_, Sphinx Domains \ Documentation. Examples -------- >>> data = format_exception_numpy('dumb', 0, IOError) """ return etype, value, tb · Haven’t tried to use np in rst docs, only as autodoc from .py docstrings.