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

scipy-svn@scip... scipy-svn@scip...
Sun Nov 2 03:53:35 CST 2008


Author: cdavid
Date: 2008-11-02 03:53:28 -0600 (Sun, 02 Nov 2008)
New Revision: 4915

Modified:
   trunk/scipy/stats/stats.py
Log:
Use numpy means/var in Student's t-test.

Modified: trunk/scipy/stats/stats.py
===================================================================
--- trunk/scipy/stats/stats.py	2008-11-02 09:53:10 UTC (rev 4914)
+++ trunk/scipy/stats/stats.py	2008-11-02 09:53:28 UTC (rev 4915)
@@ -1720,8 +1720,8 @@
 Returns: t-value, two-tailed prob
 """
     a = asarray(a)
-    x = mean(a,None)
-    v = var(a,None)
+    x = np.mean(a)
+    v = np.var(a, ddof=1)
     n = len(a)
     df = n-1
     svar = ((n-1)*v) / float(df)



More information about the Scipy-svn mailing list