Questions tagged [numpydoc]

Numpydoc is a set of extensions for the Sphinx documentation generator, it adds support for docstrings formatted according to the NumPy documentation format.

Numpydoc is a set of extensions for the Sphinx documentation generator, it adds support for docstrings formatted according to the NumPy documentation format. It is licensed under the BSD license.

The parsing of NumPy style docstrings can be made by the Napoleon extension of Sphinx. NumPy style docstrings are converted to ReStructuredText before they are processed by Sphinx into documentation. This allows use of both reStructuredText in docstrings together with the addition of NumPy style docstrings.

Official Numpydoc site.

Sphinx support for NumPy and Google docstrings.

65 questions
0
votes
1 answer

How to configure Sphinx autodoc to document classes in __init__.py?

I have Python codes with NumPy docstrings. Manage to use Sphinx for the API documentation, however, classes in the __init__.py file not documented successfully. Example: xxx/__init__.py from __future__ import annotations import sys import re from…
CarolL
  • 59
  • 2
  • 8
0
votes
1 answer

Numpydoc how to document the signature of a function as an argument

I have the function def foo(bar): return bar(var1, var2) where bar is a function that takes two variables named var1 and var2 and returns an str obj, what is the proper numpydocs way to document this? I thought of something like: def foo(bar): …
Tomergt45
  • 579
  • 1
  • 7
  • 19
0
votes
1 answer

Broken format while using numpydoc and sphinx

I'm using sphinx with numpydoc extension. when I make html, every last item in my 'Examples' paragraph is broken. This is what I try to make document : """ ... Examples -------- Example of using gauss_elem…
LegenDUST
  • 142
  • 9
0
votes
0 answers

Write power of 2 in sphinx documentation

I try to write power of 2 but I get something strange. def cal_xy(X, Y): """ Parameters ---------- X : np.ndarray, shape=(2\ :sup:`n`, 2\ :sup:`n`) Y : np.ndarray, shape=(2\ :sup:`n`, n) Returns ------- xy :…
hamster on wheels
  • 2,771
  • 17
  • 50
-2
votes
2 answers

Docstrings parameters to be passed directly to API call

I am writing documentation for my method which has many parameters, but all are just being directly passed into an API call. It will look something like this: def func(a, b, c, d, e, f, g, h): api(a, b, c, d, e, f, g, h) What should I put for…
1 2 3 4
5