[SciPy-user] scikits.timeseries DateArray Question[timeseriesdocumentation]

Pierre GM pgmdevlist@gmail....
Wed Dec 3 16:25:13 CST 2008

On Dec 3, 2008, at 5:18 PM, Dharhas Pothina wrote:

> Hi,
> Almost there I think. I'm getting the following error :
> Traceback (most recent call last):
>  File "/home/dharhas/scripts/selfe/plot- 
> stations_selfevsfield_wfreq.py", line 210, in <module>
>    fseries_freq = fseries.convert(freq='D', func=mean)
> AttributeError: 'function' object has no attribute 'convert'
> What am I doing wrong?

Well, you're obviously accessing a function instead of a TimeSeries  

> #remove -999.9 nodata values fo parameter
> fseries[fseries==-999.9] = ma.masked
> fseries = fseries.fill_missing_dates

Here's the culprit: you forgot to put the () after fill_missing_dates.  
Therefore, fseries is a reference to the method `fill_missing_dates`,  
that is, a function. Put the () and then you reference the output of  
the method, which is a TimeSeries object, like you wanted.

More information about the SciPy-user mailing list