[Scipy-svn] r4747 - trunk/scipy/stats
scipy-svn at scipy.org
scipy-svn at scipy.org
Fri Sep 26 00:04:40 EDT 2008
Author: cdavid
Date: 2008-09-25 23:04:19 -0500 (Thu, 25 Sep 2008)
New Revision: 4747
Modified:
trunk/scipy/stats/stats.py
Log:
Deprecate stats.median.
Modified: trunk/scipy/stats/stats.py
===================================================================
--- trunk/scipy/stats/stats.py 2008-09-26 04:03:37 UTC (rev 4746)
+++ trunk/scipy/stats/stats.py 2008-09-26 04:04:19 UTC (rev 4747)
@@ -482,6 +482,13 @@
The median of each remaining axis, or of all of the values in the array
if axis is None.
"""
+ warnings.warn("""\
+scipy.stats.median is deprecated; please update your code to use numpy.median.
+Please note that:
+ - numpy.median axis argument defaults to None, not 0
+ - numpy.median has a ddof argument to replace bias in a more general manner.
+ scipy.stats.median(a, bias=True) can be replaced by numpy.median(x,
+axis=0, ddof=1).""", DeprecationWarning)
a, axis = _chk_asarray(a, axis)
if axis != 0:
a = np.rollaxis(a, axis, 0)
More information about the Scipy-svn
mailing list