[SciPy-User] scikits.timeseries question

Christopher Barker Chris.Barker@noaa....
Mon Nov 30 17:58:29 CST 2009

HI all,

Maybe I'm missing something, but I can't seem to get this to work as I'd 

I have a bunch of data that is indexed by "day since Jan 1, 2001". It 
seemed I should be able to do a DateArray like this:

In [40]: import scikits.timeseries as ts

In [41]: sd = ts.Date(freq='D', year=2001, month=1, day=1)

In [42]: sd
Out[42]: <D : 01-Jan-2001>

In [43]: da = ts.date_array((1,2,3,4), start_date=sd)

In [44]: da
DateArray([1, 2, 3, 4],

but it looks like it didn't get the frequency ffomr teh start date, so I 

In [46]: da = ts.date_array((1,2,3,4), start_date=sd, freq='D')

In [47]: da
DateArray([01-Jan-0001, 02-Jan-0001, 03-Jan-0001, 04-Jan-0001],

Now it's got the frequency, but it's using  year 0001, instead of 2001, 
which is the same as I get if I don't use a start_date at all.

What am I missing?

In [50]: ts.__version__
Out[50]: '0.91.3'


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception


More information about the SciPy-User mailing list