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

scipy-svn at scipy.org scipy-svn at scipy.org
Sun Nov 4 00:33:50 EDT 2007


Author: cookedm
Date: 2007-11-03 23:33:48 -0500 (Sat, 03 Nov 2007)
New Revision: 3496

Modified:
   trunk/scipy/stats/stats.py
Log:
scipy/stats/stats.py: fix spelling, and replace a print with a raise


Modified: trunk/scipy/stats/stats.py
===================================================================
--- trunk/scipy/stats/stats.py	2007-11-04 04:32:23 UTC (rev 3495)
+++ trunk/scipy/stats/stats.py	2007-11-04 04:33:48 UTC (rev 3496)
@@ -1754,7 +1754,7 @@
     arguments.  rvs needs to accept the size= keyword if a function.  rvs
     can also be a vector of RVs.
 
-    cdf can be a function or a string indicating the distriubtion type.
+    cdf can be a function or a string indicating the distribution type.
 
     if the p-value is greater than the significance level (say 5%), then we
     cannot reject the hypothesis that the data come from the given
@@ -2031,8 +2031,7 @@
     Returns: statistic, p-value ???
     """
     if len(para) != len(data):
-        print "data and para must be same length in aglm"
-        return
+        raise ValueError("data and para must be same length in aglm")
     n = len(para)
     p = _support.unique(para)
     x = zeros((n,len(p)))  # design matrix
@@ -2051,6 +2050,8 @@
         t = dot(c,b) / np.sqrt(s_sq*fact)
         probs = betai(0.5*df,0.5,float(df)/(df+t*t))
         return t, probs
+    else:
+        raise ValueError("only ttest_ind implemented")
 
 
 def f_value_wilks_lambda(ER, EF, dfnum, dfden, a, b):




More information about the Scipy-svn mailing list