[SciPy-User] Crash with Report from scikits.timeseries

Sergi Pons Freixes spons@utm.csic...
Tue Mar 2 10:07:11 CST 2010


Hi All,

When creating a simple report, I get an error which I'm not able to
find out the cause:

#Load the modules:
In [1]: import scikits.timeseries as ts
In [2]: import scikits.timeseries.lib.reportlib as rl

#Load data:
In [3]: labels = ["Temp", "S", "O2(%)", "dinophyceae", "diatoms",
"chlorophyceae", "resta", "pseudonitzschia",
"prymnesiophyceae(cocolitoforal)", "dinophysis",
"alexandrium_minutum", "alexandrium_catenella", "dinophysis_caudata",
"dinophysis_rotundata", "dinophysis_sacculus", "event"]
In [4]: cols = [0] + range(3,19)
In [5]: len(labels)
Out[5]: 16
In [6]: len(cols)
Out[6]: 17
In [7]: tmp = ts.tsfromtxt("AS.txt", freq='D', delimiter='\t',
skip_header=1, usecols=cols, datecols=0, missing_values='nan' )
In [8]: tmp.data.shape
Out[8]: (711,)

#Create Report
In [9]: report = rl.Report(tmp)
In [10]: report()
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)

/home/sergi/Dropbox/doctorat/dades_alfacs/<ipython console> in <module>()

/usr/local/lib/python2.6/dist-packages/scikits.timeseries-0.91.3-py2.6-linux-i686.egg/scikits/timeseries/lib/reportlib.pyc
in __call__(self, *tseries, **kwargs)
   344                 [datefmt_func(d)] + \
   345                 [fmt_func[i](ser.series[d - _sd]) \
--> 346                  for i, ser in enumerate(tseries)]
   347             )
   348

/usr/lib/python2.6/dist-packages/numpy/ma/core.pyc in __getitem__(self, indx)
  2576 #            msg = "Masked arrays must be filled before they
can be used as indices!"

  2577 #            raise IndexError, msg

-> 2578         dout = ndarray.__getitem__(ndarray.view(self, ndarray), indx)
  2579         # We could directly use ndarray.__getitem__ on self...

  2580         # But then we would have to modify __array_finalize__
to prevent the


IndexError: index out of bounds

Is there something wrong with my data (even it is loaded with no errors).

Regards,
Sergi

-- 
Sergi Pons Freixes
Ph.D. Student
Marine Technology Unit
Centre Mediterrani d'Investigacions Marines i Ambientals (CMIMA-CSIC)
Pg. Marítim Barceloneta, 37-49
E-08003 Barcelona (Spain)
Ph.  +34 93 230 95 00 (ext. 1510)
Fax. +34 93 230 95 55
spons@utm.csic.es
http://www.utm.csic.es


More information about the SciPy-User mailing list