[SciPy-dev] cephes docstrings editable?

Ralf Gommers ralf.gommers@googlemail....
Thu Dec 31 21:11:46 CST 2009


On Fri, Jan 1, 2010 at 12:04 AM, <josef.pktd@gmail.com> wrote:

> is it possible to edit the cephes doc strings in scipy.special?
>
> for example:
>
> http://docs.scipy.org/scipy/docs/scipy.special._cephes.chdtr/#scipy-special-chdtr
>
> The doc editor allows editing, but doesn't show the source. Are edits
> propagated back to wherever the generated (?) doc strings are hiding?
>
>
>
The patch generation indeed has a problem, so it would need some manual work
when merging the wiki edit. But don't let that stop you from editing that
docstring, the edits will land in svn at some point anyway.

There's already an edit made to cephes.erf
http://docs.scipy.org/scipy/docs/scipy.special._cephes.erf/ , which will
result in the patch below at the moment.

Cheers,
Ralf


ERROR: scipy.special._cephes.erf: source location for docstring is not known

--- unknown-source-location/scipy.special._cephes.erf.py.old
+++ unknown-source-location/scipy.special._cephes.erf.py
@@ -1,3 +1,39 @@
 # scipy.special._cephes.erf: Source location for docstring not known
 def erf():
+    """
+    erf(x[, out])
+
+    Returns the error function of complex argument.
+
+    It is defined as :
+
+    ..math:: 2/\\sqrt(\\pi)*\\int_{t=0..x}(\\exp(-t^2))
+
+    Parameters
+    ----------
+    x : ndarray
+        the error function is computed for each item of x
+
+    Returns
+    -------
+    res : ndarray
+        the values of the error function at the given points x.
+
+    Notes
+    -----
+    The cumulative of the unit normal distribution is given by:
+
+    ..math:: \\Phi(z) = \\frac{1}{2}[1 + erf(\\frac{z}{\\sqrt{2}})]
+
+    References
+    ----------
+    .. [1] http://en.wikipedia.org/wiki/Error_function
+    .. [2] Milton Abramowitz and Irene A. Stegun, eds.
+        Handbook of Mathematical Functions with Formulas,
+        Graphs, and Mathematical Tables. New York: Dover,
+        1972. http://www.math.sfu.ca/~cbm/aands/page_297.htm
+
+    See : erfc, erfinv, erfcinv
+
+    """
     pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100101/9c9a284f/attachment.html 


More information about the SciPy-Dev mailing list