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

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Sep 26 00:03:55 EDT 2008


Author: cdavid
Date: 2008-09-25 23:03:37 -0500 (Thu, 25 Sep 2008)
New Revision: 4746

Modified:
   trunk/scipy/stats/stats.py
Log:
Deprecate stats.mean.


Modified: trunk/scipy/stats/stats.py
===================================================================
--- trunk/scipy/stats/stats.py	2008-09-26 04:02:51 UTC (rev 4745)
+++ trunk/scipy/stats/stats.py	2008-09-26 04:03:37 UTC (rev 4746)
@@ -404,6 +404,13 @@
     all values in the array if axis=None. The return value will have a floating
     point dtype even if the input data are integers.
     """
+    warnings.warn("""\
+scipy.stats.mean is deprecated; please update your code to use numpy.mean.
+Please note that:
+    - numpy.mean axis argument defaults to None, not 0
+    - numpy.mean has a ddof argument to replace bias in a more general manner.
+      scipy.stats.mean(a, bias=True) can be replaced by numpy.mean(x,
+axis=0, ddof=1).""", DeprecationWarning)
     a, axis = _chk_asarray(a, axis)
     return a.mean(axis)
 




More information about the Scipy-svn mailing list