[Numpy-svn] r8237 - trunk/numpy/ma

numpy-svn@scip... numpy-svn@scip...
Sun Feb 21 05:58:38 CST 2010


Author: ptvirtan
Date: 2010-02-21 05:58:38 -0600 (Sun, 21 Feb 2010)
New Revision: 8237

Modified:
   trunk/numpy/ma/core.py
Log:
ENH: ma: use domains also in _DomainedBinaryOperation.__call__ (previously they were used only in __array_wrap__, which wouldn't be called from __div__ et al. which call the domained operations directly)

Modified: trunk/numpy/ma/core.py
===================================================================
--- trunk/numpy/ma/core.py	2010-02-21 11:36:36 UTC (rev 8236)
+++ trunk/numpy/ma/core.py	2010-02-21 11:58:38 UTC (rev 8237)
@@ -1068,6 +1068,10 @@
         m = ~umath.isfinite(result)
         m |= ma
         m |= mb
+        # Apply the domain
+        domain = ufunc_domain.get(self.f, None)
+        if domain is not None:
+            m |= filled(domain(da, db), True)
         # Take care of the scalar case first
         if (not m.ndim):
             if m:



More information about the Numpy-svn mailing list