[Scipy-svn] r2973 - trunk/Lib/sandbox/maskedarray
scipy-svn at scipy.org
scipy-svn at scipy.org
Tue May 8 11:59:35 EDT 2007
Author: pierregm
Date: 2007-05-08 10:59:31 -0500 (Tue, 08 May 2007)
New Revision: 2973
Modified:
trunk/Lib/sandbox/maskedarray/core.py
Log:
core: _extrema_operation.reduce force a ravel() on array if axis=None
Modified: trunk/Lib/sandbox/maskedarray/core.py
===================================================================
--- trunk/Lib/sandbox/maskedarray/core.py 2007-05-07 16:24:37 UTC (rev 2972)
+++ trunk/Lib/sandbox/maskedarray/core.py 2007-05-08 15:59:31 UTC (rev 2973)
@@ -1214,6 +1214,7 @@
self._hardmask = False
def unshare_mask(self):
+ "Copies the mask and set the sharedmask flag to False."
if self._sharedmask:
self._mask = self._mask.copy()
self._sharedmask = False
@@ -2010,6 +2011,7 @@
kargs = { 'axis' : axis }
else:
kargs = {}
+ target = target.ravel()
if m is nomask:
t = self.ufunc.reduce(target, **kargs)
@@ -2645,6 +2647,5 @@
assert_equal(y._mask, [True, True])
#
if 1:
- x = arange(10)
- x[0] = masked
- print dot(x,x)
+ x = arange(64).reshape(8,8)
+ z = maximum(x)
More information about the Scipy-svn
mailing list