🌐
Readthedocs
numpydoc.readthedocs.io › en › latest › format.html
Style guide — numpydoc v1.11.0rc1.dev0 Manual
This document describes the syntax and best practices for docstrings used with the numpydoc extension for Sphinx. ... For an accompanying example, see example.py. Some features described in this document require a recent version of numpydoc. For example, the Yields section was added in numpydoc 0.6. We mostly follow the standard Python style ...
🌐
Sphinx
sphinx-doc.org › en › master › usage › extensions › example_numpy.html
Example NumPy Style Python Docstrings — Sphinx documentation
"""Example NumPy style docstrings. This module demonstrates documentation as specified by the `NumPy Documentation HOWTO`_. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal length. Example ------- Examples can be given using either the ``Example`` or ``Examples`` sections.
Discussions

PyCharm not rendering DocStrings correctly
Make you you set the write docstring format in settings. In the “Python integrated tools” section. If you search “Google” in settings it’s one of the hits More on reddit.com
🌐 r/pycharm
6
5
April 30, 2023
What format do you use for your docstrings?
ReST since that is what is supported natively by Sphinx. Tried Google style docstrings and could never get it to work easily with RTD More on reddit.com
🌐 r/Python
12
11
July 21, 2017
Getting Doxygen to work well with Python docstrings
Ok, it has to be asked - why bother when the Python community has sphinx ? One of the greatest complaints we hear in the scientific community when trying to convince our peers to try Python in lieu of Matlab is the lack of centralized, comprehensive documentation for the various libraries they need. That's slowly changing with readthedocs and other projects, but how is introducing another documentation system going to improve the ecosystem? What does Doxygen offer that the existing Python documentation system doesn't? More on reddit.com
🌐 r/programming
7
19
January 16, 2016
What is meant (in this article) by saying Google Docstrings don't have a "Formal Specification" while Numpydoc Docstrings do?
https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings More on reddit.com
🌐 r/learnpython
5
3
January 27, 2022
🌐
Medium
mr-amit.medium.com › numpy-docstring-explained-3d2e3b3f017a
NumPy Docstring Explained. If you think you need to spend $2,000… | by It's Amit | Medium
March 6, 2025 - Every docstring starts with a clear, one-line summary. Think of this as the elevator pitch for your function — what it does, in the simplest terms. Follow it up with a bit more detail if necessary, but keep it concise. ... Notice how the summary gets straight to the point? No fluff, no unnecessary details — just the essence of what the function does. ... Next, describe the inputs your function expects. NumPy-style docstrings use the Parameters section, formatted like this:
🌐
Readthedocs
sphinxcontrib-napoleon.readthedocs.io › en › latest › example_numpy.html
Example NumPy Style Python Docstrings — napoleon 0.7 documentation
# -*- coding: utf-8 -*- """Example NumPy style docstrings. This module demonstrates documentation as specified by the `NumPy Documentation HOWTO`_. Docstrings may extend over multiple lines. Sections are created with a section header followed by an underline of equal length.
🌐
GitHub
github.com › douglasdavis › numpydoc.el
GitHub - douglasdavis/numpydoc.el: Insert NumPy style docstrings in Python functions. · GitHub
docstr: Docstring insertion support for any programming language, including NumPy style Python (it has a programmable interface but requires a bit more setup to get the utility provided numpydoc.el).
Starred by 51 users
Forked by 8 users
Languages: Emacs Lisp
🌐
Pyansys
dev.docs.pyansys.com › doc-style › docstrings.html
Numpydoc docstrings — PyAnsys developer's guide
extensions = [ ..., "sphinx.ext.autodoc.typehints", "sphinx.ext.napoleon", "numpydoc", ..., ] autodoc_typehints = "description" When using type hints in this way, you can omit the type information in the “Parameters” and “Returns” sections. Because Python docstrings are written using reStructuredText syntax, you can take advantage of some of the directives available in this plaintext markup language.
🌐
Lsst
developer.lsst.io › python › numpydoc.html
Documenting Python APIs with docstrings — LSST DM Developer Guide main documentation
We organize Python docstrings into sections that appear in a common order. This format is based on the original Numpydoc Style Guide (used by NumPy, SciPy, and Astropy, among other scientific Python packages), though this style guide includes several DM-specific clarifications.
🌐
NumPy
numpy.org › doc › 1.20 › docs › howto_document.html
A Guide to NumPy Documentation — NumPy v1.20 Manual
January 31, 2021 - We welcome being alerted to cases we should add to the NumPy style rules. 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 ...
🌐
GitHub
github.com › emacsmirror › numpydoc
GitHub - emacsmirror/numpydoc: NumPy style docstring insertion · GitHub
An Emacs Lisp package to automatically insert NumPy style docstrings for Python functions.
Author: emacsmirror
Find elsewhere
🌐
Plain English
python.plainenglish.io › how-to-write-numpy-style-docstrings-a092121403ba
How to Write NumPy-Style Docstrings | Python in Plain English
May 25, 2022 - As so often in the Python world, there are a few best practices on how to do something, in this case how to write docstrings properly. Three main styles have evolved: the traditional style, the Google style, and the NumPy style. I advocate the NumPy style because it is very human-readable (in contrast to the traditional style) and it is widely used in the scientific and technical community, which is my own domain.
🌐
NumPy
numpy.org › doc › 1.19 › docs › howto_document.html
A Guide to NumPy/SciPy Documentation — NumPy v1.19 Manual
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).
🌐
Better Programming
betterprogramming.pub › 3-different-docstring-formats-for-python-d27be81e0d68
3 Different Docstring Formats for Python | by Yash Salvi | Better Programming
April 27, 2022 - NumPy style tends to require more vertical space, whereas Google-style tends to use more horizontal space. Google-style tends to be easier to read for short and simple docstrings, whereas NumPy-style tends to be easier to read for long and in-depth docstrings.
🌐
pythontutorials
pythontutorials.net › blog › numpy-style-docstrings
Mastering NumPy Style Docstrings: A Comprehensive Guide — pythontutorials.net
NumPy style docstrings are a specific convention for writing docstrings that have become widely adopted in the scientific Python community. They offer a structured and detailed format for documenting code, which is especially useful for complex ...
🌐
Josh Di Mella
joshdimella.com › blog › python-docstring-formats-best-practices
A Guide to Python Docstring Formats: Choosing the Right Style for Your Code | Josh Di Mella | Software Engineer
May 31, 2023 - NumPy style docstrings are commonly used in scientific computing and data analysis projects. They offer a concise and structured approach to documenting code. With sections like parameters, return values, and raised exceptions, this format ensures that crucial information is clearly communicated ...
Author: alimanfoo
🌐
pyOpenSci
pyopensci.org › python-package-guide › documentation › write-user-documentation › document-your-code-api-docstrings.html
Document the code in your package’s API using docstrings
In the example above, you saw the use of numpy-style docstrings to describe data types that are passed into functions as parameters or into classes as attributes. In a numpy-style docstring you add those types in the Parameters section of the docstring.
🌐
NumPy
numpy.org › doc › 1.21 › docs › howto_document.html
A Guide to NumPy Documentation — NumPy v1.21 Manual
June 22, 2021 - We welcome being alerted to cases we should add to the NumPy style rules. 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
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.
🌐
The Hitchhiker's Guide to Python
docs.python-guide.org › writing › documentation
Documentation — The Hitchhiker's Guide to Python
For more detailed documentation of code a popular style used, is the one used by the NumPy project, often called NumPy style docstrings.