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

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Dec 24 16:44:55 EST 2008


Author: josef
Date: 2008-12-24 15:44:53 -0600 (Wed, 24 Dec 2008)
New Revision: 5288

Modified:
   trunk/scipy/stats/stats.py
Log:
kurtosistest: return number instead of 0-dim array

Modified: trunk/scipy/stats/stats.py
===================================================================
--- trunk/scipy/stats/stats.py	2008-12-24 21:40:10 UTC (rev 5287)
+++ trunk/scipy/stats/stats.py	2008-12-24 21:44:53 UTC (rev 5288)
@@ -925,6 +925,9 @@
     term2 = np.where(denom < 0, term1, np.power((1-2.0/A)/denom,1/3.0))
     Z = ( term1 - term2 ) / np.sqrt(2/(9.0*A))
     Z = np.where(denom == 99, 0, Z)
+    if Z.ndim == 0:
+        Z = Z[()]
+    #JPNote: p-value sometimes larger than 1
     return Z, (1.0-zprob(Z))*2
 
 




More information about the Scipy-svn mailing list