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

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 20:53:10 CST 2010


Author: ptvirtan
Date: 2010-02-20 20:53:10 -0600 (Sat, 20 Feb 2010)
New Revision: 8223

Modified:
   trunk/numpy/ma/core.py
Log:
BUG: ma: fix inoperative error state set/restore

Modified: trunk/numpy/ma/core.py
===================================================================
--- trunk/numpy/ma/core.py	2010-02-21 02:52:56 UTC (rev 8222)
+++ trunk/numpy/ma/core.py	2010-02-21 02:53:10 UTC (rev 8223)
@@ -1057,9 +1057,6 @@
         # Get the data and the mask
         (da, db) = (getdata(a, subok=False), getdata(b, subok=False))
         (ma, mb) = (getmask(a), getmask(b))
-        # Save the current error status
-        err_status_ini = np.geterr()
-        np.seterr(divide='ignore', invalid='ignore')
         # Get the result
         err_status_ini = np.geterr()
         try:
@@ -1067,8 +1064,6 @@
             result = self.f(da, db, *args, **kwargs)
         finally:
             np.seterr(**err_status_ini)
-        # Reset the error status
-        np.seterr(**err_status_ini)
         # Get the mask as a combination of ma, mb and invalid
         m = ~umath.isfinite(result)
         m |= ma



More information about the Numpy-svn mailing list