[Scipy-svn] r3103 - trunk/Lib/sandbox/maskedarray

scipy-svn@scip... scipy-svn@scip...
Wed Jun 13 08:56:35 CDT 2007


Author: pierregm
Date: 2007-06-13 08:56:32 -0500 (Wed, 13 Jun 2007)
New Revision: 3103

Modified:
   trunk/Lib/sandbox/maskedarray/core.py
   trunk/Lib/sandbox/maskedarray/mrecords.py
Log:
mrecords : fixed a bug in .filled

Modified: trunk/Lib/sandbox/maskedarray/core.py
===================================================================
--- trunk/Lib/sandbox/maskedarray/core.py	2007-06-13 10:29:29 UTC (rev 3102)
+++ trunk/Lib/sandbox/maskedarray/core.py	2007-06-13 13:56:32 UTC (rev 3103)
@@ -2638,8 +2638,10 @@
     if 1:
         x = arange(10)
         assert(x.ctypes.data == x.filled().ctypes.data)
-    if 1:
-        a = array([1,2,3,4],mask=[0,0,0,0],small_mask=False)
+    if 0:
+        a = array([1,2,3,4],mask=[0,0,0,0],small_mask=True)
+        a[1] = masked
+        a[1] = 1
         assert(a.ravel()._mask, [0,0,0,0])
         assert(a.compressed(), a)
         a[0] = masked

Modified: trunk/Lib/sandbox/maskedarray/mrecords.py
===================================================================
--- trunk/Lib/sandbox/maskedarray/mrecords.py	2007-06-13 10:29:29 UTC (rev 3102)
+++ trunk/Lib/sandbox/maskedarray/mrecords.py	2007-06-13 13:56:32 UTC (rev 3103)
@@ -341,13 +341,13 @@
 If `fill_value` is None, uses self.fill_value.
         """
         _localdict = self.__dict__
-        d = _localdict['_data']
+        d = self._data
         fm = _localdict['_fieldmask']
         if not numeric.asarray(fm, dtype=bool_).any():
             return d
         #
         if fill_value is None:
-            value = _localdict['fill_value']
+            value = _localdict['_fill_value']
         else:
             value = fill_value
             if numeric.size(value) == 1:



More information about the Scipy-svn mailing list