Sphinx Autodoc和NumpyDoc

Sphinx Autodoc和NumpyDoc,numpy,python-sphinx,autodoc,numpydoc,Numpy,Python Sphinx,Autodoc,Numpydoc,尽管阅读了大量的文档,但我无法让sphinx autodoc很好地使用numpy DocString 在myconf.py中,我有: extensions = ['sphinx.ext.autodoc', 'numpydoc'] 在我的文档文件中,我有: .. automodule:: python_file .. autoclass:: PythonClass :members: 其中python_file.py具有: class PythonClass(object):

尽管阅读了大量的文档,但我无法让sphinx autodoc很好地使用numpy DocString

在my
conf.py
中,我有:

extensions = ['sphinx.ext.autodoc', 'numpydoc']
在我的文档文件中,我有:

 .. automodule:: python_file

 .. autoclass:: PythonClass
   :members:
其中
python_file.py
具有:

class PythonClass(object):
    def do_stuff(x):
        """
        This does good stuff.

        Here are the details about the good stuff it does.

        Parameters
        ----------
        x : int
            An integer which has amazing things done to it

        Returns
        -------
        y : int
            Some other thing
        """
        return x + 1
当我运行
makehtml
时,我得到
错误:未知指令类型“autosummary”
。当我将
autosummary
添加到我的
扩展中时,因此:

extensions = ['sphinx.ext.autodoc', 'numpydoc', 'sphinx.ext.autosummary']
我得到:

WARNING: toctree references unknown document u'docs/python_file.PythonClass.do_stuff'
根据的建议,我将
numpydoc\u show\u class\u members=False
添加到我的
conf.py

现在我可以运行
makehtml
而不会出错,但是
参数
返回
部分不会被解释为numpydoc部分


有办法摆脱这种混乱吗?

尝试删除以前的整个
html
输出。然后重新生成文档。

这对我不起作用。删除并重新运行后存在相同问题。还有其他想法吗?