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

scipy-svn at scipy.org scipy-svn at scipy.org
Wed Jan 10 13:13:23 CST 2007


Author: mattknox_ca
Date: 2007-01-10 13:13:21 -0600 (Wed, 10 Jan 2007)
New Revision: 2525

Modified:
   trunk/Lib/sandbox/timeseries/timeseries.py
Log:
modified convert method to reflect latest cseries code

Modified: trunk/Lib/sandbox/timeseries/timeseries.py
===================================================================
--- trunk/Lib/sandbox/timeseries/timeseries.py	2007-01-10 19:12:24 UTC (rev 2524)
+++ trunk/Lib/sandbox/timeseries/timeseries.py	2007-01-10 19:13:21 UTC (rev 2525)
@@ -201,6 +201,7 @@
 
             _values = cRetVal['values']
             _mask = cRetVal['mask']
+            startIndex = cRetVal['startindex']
             
             tempData = ma.array(_values)
             tempMask = ma.make_mask(_mask)
@@ -208,14 +209,8 @@
 
             if func is not None and tempData.ndim == 2:
                 tempData = corelib.apply_along_axis(func, 1, tempData)
-                
-            startIndex = cseries.asfreq(numpy.asarray(int(self.start_date())), fromFreq, toFreq, 'BEFORE')
-            newStart = tsdate.Date(freq=toFreq, value=startIndex)
 
-            endIndex = cseries.asfreq(numpy.asarray(int(self.end_date())), fromFreq, toFreq, 'AFTER')
-            newEnd = tsdate.Date(freq=toFreq, value=endIndex)
-
-            return adjust_endpoints(TimeSeries(tempData, freq=toFreq, observed=self.observed, start_date=startIndex), start_date=newStart, end_date=newEnd)
+            return TimeSeries(tempData, freq=toFreq, observed=self.observed, start_date=startIndex)
             
         else:
             return copytools.deepcopy(self)



More information about the Scipy-svn mailing list