[Scipy-svn] r2673 - trunk/Lib/sandbox/timeseries

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Feb 2 09:21:53 EST 2007


Author: mattknox_ca
Date: 2007-02-02 08:21:45 -0600 (Fri, 02 Feb 2007)
New Revision: 2673

Modified:
   trunk/Lib/sandbox/timeseries/tseries.py
Log:
made tsmasked behave the same as ma.masked when used as the value in __setitem__

Modified: trunk/Lib/sandbox/timeseries/tseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tseries.py	2007-02-02 14:14:52 UTC (rev 2672)
+++ trunk/Lib/sandbox/timeseries/tseries.py	2007-02-02 14:21:45 UTC (rev 2673)
@@ -375,7 +375,9 @@
             raise MAError, 'Cannot alter the masked element.'
         (sindx, dindx) = self.__checkindex(indx)
         #....
-        if isinstance(value, TimeSeries):
+        if value is tsmasked:
+            self._series[sindx] = masked
+        elif isinstance(value, TimeSeries):
             assert(_timeseriescompat(self[sindx], value))
             self._series[sindx] = value._series
         else:




More information about the Scipy-svn mailing list