Dear list,
I use the napoleon extension to parse my "numpy-style" docstrings. It works great for functions, but for classes, I have the following problem. The "Attributes" section list the attributes (as it should), but the header "Attributes" does not show. For instance, I get this:
where X, A, etc are attributes of this class ParticleHistory. You can click on [source] to see how the class is defined; or more simply see below for a simplified version.
Am I doing something wrong? This page:
says that Attributes is a supported header.
I'm using sphinx 1.8.2 on Ubuntu 18.04.
Many thanks in advance
Nicolas
class History(object):
"""Stores history.
Blah, blah, blah.
Attributes
----------
X: list
X[t] is the object that represents the N particles at iteration t
A: list
A[t] is the vector of ancestor indices at time t
"""
def __init__(self, N):
"""
Constructor.
Parameters
----------
N: int
number of particles
"""
self.N = N