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

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Feb 1 15:47:01 EST 2007


Author: pierregm
Date: 2007-02-01 14:46:59 -0600 (Thu, 01 Feb 2007)
New Revision: 2669

Modified:
   trunk/Lib/sandbox/maskedarray/core.py
Log:
core: make sure that masked_array(masked) is masked

Modified: trunk/Lib/sandbox/maskedarray/core.py
===================================================================
--- trunk/Lib/sandbox/maskedarray/core.py	2007-02-01 18:15:59 UTC (rev 2668)
+++ trunk/Lib/sandbox/maskedarray/core.py	2007-02-01 20:46:59 UTC (rev 2669)
@@ -855,6 +855,8 @@
         # 1. Argument is MA ...........
         if isinstance(data, MaskedArray) or\
            (hasattr(data,"_mask") and hasattr(data,"_data")) :
+            if data is masked:
+                return masked
             if keep_mask:
                 if mask is nomask:
                     if copy:
@@ -3023,4 +3025,5 @@
         a = arange(4)
         a[1:-1] = masked
         b = a[:-5]
-
+    if 1:
+        assert(masked_array(masked) is masked)




More information about the Scipy-svn mailing list