[Numpy-discussion] Sphinx/Numpydoc, attributes and property
Fabricio Silva
silva at lma.cnrs-mrs.fr
Thu Oct 22 13:28:14 EDT 2009
It seems that either Sphinx or NumpyDoc is having troubles with property
attributes.
Considering the following piece of code in foo.py
class Profil(object):
"""
Blabla
Attributes
----------
tfin
tdeb : float
Startpoint
pts : array
Blabla2.
"""
def __init__(self):
"""
"""
self.pts = np.array([[0,1]])
@property
def tfin(self):
"The time horizon endpoint."
return self.pts[0,:].max()
@property
def tdeb(self):
"The time horizon startpoint."
return self.pts[0,:].min()
and a foo.rst containing
:mod:`foo` -- BlaTitle
=====================================================
.. autoclass:: foo.Profil
produces an attribute-table with only pts but without tfin and tdeb.
How can I handle this?
--
Fabrice Silva
Laboratory of Mechanics and Acoustics (CNRS, UPR 7051)
More information about the NumPy-Discussion
mailing list