[Numpy-svn] r4751 - branches/maskedarray/numpy/ma

numpy-svn@scip... numpy-svn@scip...
Thu Jan 24 03:57:26 CST 2008


Author: pierregm
Date: 2008-01-24 03:57:22 -0600 (Thu, 24 Jan 2008)
New Revision: 4751

Modified:
   branches/maskedarray/numpy/ma/core.py
Log:


Modified: branches/maskedarray/numpy/ma/core.py
===================================================================
--- branches/maskedarray/numpy/ma/core.py	2008-01-24 09:53:36 UTC (rev 4750)
+++ branches/maskedarray/numpy/ma/core.py	2008-01-24 09:57:22 UTC (rev 4751)
@@ -3121,7 +3121,8 @@
         _view = type(a)
     else:
         _view = MaskedArray
-    condition = condition.view(ndarray)
+    # Force the condition to a regular ndarray (forget the missing values...)
+    condition = numpy.array(condition, copy=False, subok=False)
     #
     _new = ndarray.compress(_data, condition, axis=axis, out=out).view(_view)
     _new._update_from(a)



More information about the Numpy-svn mailing list