[Scipy-svn] r2682 - trunk/Lib/sandbox/timeseries/plotlib

scipy-svn@scip... scipy-svn@scip...
Tue Feb 6 10:08:06 CST 2007


Author: mattknox_ca
Date: 2007-02-06 10:08:02 -0600 (Tue, 06 Feb 2007)
New Revision: 2682

Modified:
   trunk/Lib/sandbox/timeseries/plotlib/mpl_timeseries.py
Log:
fixed import statements. cast to integer values passed to Date constructor to avoid warnings

Modified: trunk/Lib/sandbox/timeseries/plotlib/mpl_timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/plotlib/mpl_timeseries.py	2007-02-06 02:46:47 UTC (rev 2681)
+++ trunk/Lib/sandbox/timeseries/plotlib/mpl_timeseries.py	2007-02-06 16:08:02 UTC (rev 2682)
@@ -32,10 +32,8 @@
 import numpy as N
 import maskedarray as MA
 
-import tdates
-from tdates import date_array, Date
-import tseries
-from tseries import TimeSeries
+import timeseries as TS
+from timeseries import date_array, Date, TimeSeries
 
 import warnings
 
@@ -192,8 +190,8 @@
     def _initialize_dates(self, start_val, end_val):
         "Returns a DateArray for the current frequency."
         freq = self.freqstr
-        dates = date_array(start_date=Date(freq, value=start_val),
-                           end_date=Date(freq, value=end_val), 
+        dates = date_array(start_date=Date(freq, value=int(start_val)),
+                           end_date=Date(freq, value=int(end_val)), 
                            freq=freq)
         return dates
 
@@ -719,9 +717,9 @@
 
     da = date_array(start_date=Date(freq='D', year=2003, quarter=3, month=1, day=17), 
                     length=51)
-    ser = tseries.time_series(MA.arange(len(da)), dates=da)
+    ser = TS.time_series(MA.arange(len(da)), dates=da)
     ser[4] = MA.masked
-    ser_2 = tseries.time_series(MA.arange(len(da)), dates=da.asfreq('M'))
+    ser_2 = TS.time_series(MA.arange(len(da)), dates=da.asfreq('M'))
     
     pylab.figure()
     pylab.gcf().add_tsplot(111)



More information about the Scipy-svn mailing list