[Numpy-discussion] How to get docs for functions processed by numpy.vectorize?
jhaiduce at gmail.com
Thu Sep 11 11:46:35 EDT 2014
When I apply numpy.vectorize() to a function, documentation tools behave
inconsistently with regard to the new, vectorized function. The
function's __doc__ attribute does contain the docstring of the original
function as expected, but the built-in help() command displays the
documentation of the numpy.vectorize class, and sphinx-autodoc fails to
display the function at all. Is there a way to get sphinx-autodoc and
the built-in help() command to display the docstring of the function and
not something else?
>>> import numpy as np
>>> def myfunc(x):
... "Square x"
... return x**2
>>> print myfunc.__doc__
(displays documentation of np.vectorize)
More information about the NumPy-Discussion