[Numpy-svn] r4794 - in trunk/numpy: core lib

numpy-svn@scip... numpy-svn@scip...
Tue Feb 12 20:44:47 CST 2008


Author: matthew.brett@gmail.com
Date: 2008-02-12 20:44:43 -0600 (Tue, 12 Feb 2008)
New Revision: 4794

Modified:
   trunk/numpy/core/defmatrix.py
   trunk/numpy/lib/function_base.py
Log:
Fix missing mean for median calculation, missing dtype from defmatrix mean signature

Modified: trunk/numpy/core/defmatrix.py
===================================================================
--- trunk/numpy/core/defmatrix.py	2008-02-13 02:26:58 UTC (rev 4793)
+++ trunk/numpy/core/defmatrix.py	2008-02-13 02:44:43 UTC (rev 4794)
@@ -266,7 +266,7 @@
         """
         return N.ndarray.sum(self, axis, dtype, out)._align(axis)
 
-    def mean(self, axis=None, out=None):
+    def mean(self, axis=None, dtype=None, out=None):
         """Compute the mean along the specified axis.
 
         Returns the average of the array elements.  The average is taken over
@@ -304,7 +304,7 @@
         The mean is the sum of the elements along the axis divided by the
         number of elements.
         """
-        return N.ndarray.mean(self, axis, out)._align(axis)
+        return N.ndarray.mean(self, axis, dtype, out)._align(axis)
 
     def std(self, axis=None, dtype=None, out=None):
         """Compute the standard deviation along the specified axis.

Modified: trunk/numpy/lib/function_base.py
===================================================================
--- trunk/numpy/lib/function_base.py	2008-02-13 02:26:58 UTC (rev 4793)
+++ trunk/numpy/lib/function_base.py	2008-02-13 02:44:43 UTC (rev 4794)
@@ -20,7 +20,7 @@
      integer, isscalar
 from numpy.core.umath import pi, multiply, add, arctan2,  \
      frompyfunc, isnan, cos, less_equal, sqrt, sin, mod, exp, log10
-from numpy.core.fromnumeric import ravel, nonzero, choose, sort
+from numpy.core.fromnumeric import ravel, nonzero, choose, sort, mean
 from numpy.core.numerictypes import typecodes
 from numpy.lib.shape_base import atleast_1d, atleast_2d
 from numpy.lib.twodim_base import diag



More information about the Numpy-svn mailing list