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

scipy-svn@scip... scipy-svn@scip...
Tue Feb 27 09:09:23 CST 2007


Author: mattknox_ca
Date: 2007-02-27 09:09:20 -0600 (Tue, 27 Feb 2007)
New Revision: 2772

Modified:
   trunk/Lib/sandbox/timeseries/tdates.py
Log:
fixed problem causing unit tests to fail (for printing when DateArray is data portion of maskedarray

Modified: trunk/Lib/sandbox/timeseries/tdates.py
===================================================================
--- trunk/Lib/sandbox/timeseries/tdates.py	2007-02-27 15:04:10 UTC (rev 2771)
+++ trunk/Lib/sandbox/timeseries/tdates.py	2007-02-27 15:09:20 UTC (rev 2772)
@@ -599,10 +599,11 @@
             # behaviour
             return Date(self.freq, value=r.item())
         else:
-            r._cachedinfo.update(dict(steps=None, full=None, hasdups=None))
-            for attr in ('tostr','toobj','toord'):
-                if r._cachedinfo[attr] is not None:
-                    r._cachedinfo[attr] = r._cachedinfo[attr][indx]
+            if hasattr(r, '_cachedinfo'):
+                r._cachedinfo.update(dict(steps=None, full=None, hasdups=None))
+                for attr in ('tostr','toobj','toord'):
+                    if r._cachedinfo[attr] is not None:
+                        r._cachedinfo[attr] = r._cachedinfo[attr][indx]
             return r
         
     def __repr__(self):



More information about the Scipy-svn mailing list