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

numpy-svn@scip... numpy-svn@scip...
Tue Aug 5 19:12:02 CDT 2008


Author: pierregm
Date: 2008-08-05 19:12:01 -0500 (Tue, 05 Aug 2008)
New Revision: 5615

Modified:
   trunk/numpy/ma/core.py
Log:
* MaskedArray.__new__: prevents self._optinfo to be overwritten (it's defined w/ the call to .view)

Modified: trunk/numpy/ma/core.py
===================================================================
--- trunk/numpy/ma/core.py	2008-08-06 00:11:22 UTC (rev 5614)
+++ trunk/numpy/ma/core.py	2008-08-06 00:12:01 UTC (rev 5615)
@@ -1228,7 +1228,6 @@
         # Process data............
         _data = np.array(data, dtype=dtype, copy=copy, subok=True, ndmin=ndmin)
         _baseclass = getattr(data, '_baseclass', type(_data))
-        _optinfo = {}
         # Check that we'ew not erasing the mask..........
         if isinstance(data,MaskedArray) and (data.shape != _data.shape):
             copy = True
@@ -1320,7 +1319,6 @@
         # Process extra options ..
         _data._hardmask = hard_mask
         _data._baseclass = _baseclass
-        _data._optinfo = _data._basedict = _optinfo
         return _data
     #
     def _update_from(self, obj):



More information about the Numpy-svn mailing list