开发者

'Unexpected Section Title' with Sphinx -- is numpy the issue?

When running

sphinx-build . html/

in my doc/ directory, I get the following output:

$ sphinx-build . html/
Running Sphinx v0.6.4
No builder selected, using defau开发者_如何学Clt: html
loading pickled environment... done
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
reading sources... [100%] index                 
reST markup error:
HIDDEN/PATH/matplotlib_visualization.py:docstring of simulator.extensions.matplotlib_visualization.beta:20: (SEVERE/4) Unexpected section title.

This file has numpy imports, and after a little research, it seems like the RST markup that sphinx uses has a problem with the way numpy is documented. When I take out the numpy import, the html builds fine.

What would be the best way to resolve this issue?


The subject is discussed in this thread: https://groups.google.com/d/msg/sphinx-users/MAFTlX8pAvk/B9hx7MuBVbIJ

Pierre GM says: "fredrik, Looks like you're using thw numpy standard for your documentation. Consider then using the numpydoc extensions that Pauli Virtanen implemented: it's available here: http://sphinx.googlecode.com/svn/contrib/trunk/ "

Current information abut numpydoc: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt

Moved information about NumpyDoc: https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜