talira

numpydoc

Sphinx extension for NumPy-style docstrings

open sourceBSD-2-Clausefree

numpydoc is the NumPy project's Sphinx extension for docstrings written in the NumPy documentation format, the convention set out in its docstring guide. It also adds code description directives such as np:function and np-c:function, and a pre-commit hook that validates docstrings. It needs Python 3.10+ and Sphinx 6+.

Ways to install

Package managers

Problems it solves

  • render NumPy-style docstrings in Sphinx docs
  • check my Python docstrings follow the NumPy convention
  • document a scientific Python library with Sphinx

Features

  • renders NumPy-format docstrings in Sphinx
  • np:function and np-c:function directives
  • docstring validation pre-commit hook
  • the NumPy docstring style guide

Alternatives

The same job

These do what numpydoc does.

  1. sphinx-autodoc-typehints Render Python type hints in Sphinx autodoc documentation
  2. Sphinx Create intelligent and beautiful documentation with ease
  3. MyST-Parser Write Sphinx and Docutils documentation in MyST Markdown
  4. PyData Sphinx Theme Clean, three-column, Bootstrap-based theme for Sphinx docs
  5. Read the Docs Sphinx Theme The Read the Docs theme for Sphinx documentation
  6. nbsphinx Sphinx extension that renders Jupyter notebooks in HTML and LaTeX documentation

Compare numpydoc with the top 3