[Scipy-svn] r6374 - trunk/scipy/stats

scipy-svn at scipy.org scipy-svn at scipy.org
Sat May 8 04:43:55 EDT 2010


Author: rgommers
Date: 2010-05-08 03:43:55 -0500 (Sat, 08 May 2010)
New Revision: 6374

Modified:
   trunk/scipy/stats/distributions.py
Log:
DOC: Convert wald to new-style docstring. Add `shapes` attribute to rv_discrete.

Modified: trunk/scipy/stats/distributions.py
===================================================================
--- trunk/scipy/stats/distributions.py	2010-05-08 08:43:42 UTC (rev 6373)
+++ trunk/scipy/stats/distributions.py	2010-05-08 08:43:55 UTC (rev 6374)
@@ -579,6 +579,7 @@
             badvalue = nan
         self.badvalue = badvalue
         self.name = name
+        self.shapes = shapes
         self.a = a
         self.b = b
         if a is None:
@@ -3587,6 +3588,14 @@
 ## Wald distribution (Inverse Normal with shape parameter mu=1.0)
 
 class wald_gen(invnorm_gen):
+    """A Wald continuous random variable.
+
+    %(before_pdf)s
+    pdf(x, loc=0, scale=1)
+        The probability density function, defined by
+        ``1/sqrt(2*pi*x**3) * exp(-(x-1)**2/(2*x))``, for ``x > 0``.
+    %(after_pdf)s
+    """
     def _rvs(self):
         return invnorm_gen._rvs(self, 1.0)
     def _pdf(self, x):
@@ -3595,16 +3604,9 @@
         return invnorm.cdf(x,1,0)
     def _stats(self):
         return 1.0, 1.0, 3.0, 15.0
-wald = wald_gen(a=0.0, name="wald", longname="A Wald",
-                extradoc="""
+wald = wald_gen(a=0.0, name="wald")
 
-Wald distribution
 
-wald.pdf(x) = 1/sqrt(2*pi*x**3) * exp(-(x-1)**2/(2*x))
-for x > 0.
-"""
-                )
-
 ## Weibull
 ## See Frechet
 




More information about the Scipy-svn mailing list