[SciPy-Dev] Unexpected behaviour from timeseries.filled (in Python 2.7)
Åsmund Hjulstad
asmund.hjulstad at gmail.com
Mon Sep 6 05:22:08 EDT 2010
It seems something in Python 2.7 / Numpy 1.5 (or my Python 2.7
installation) is breaking scikits.timeseries.filled
import scikits.timeseries
from numpy import array
t3 = scikits.timeseries.time_series(array([0.]),
mask=[True],dates=['2010-Aug'],freq='M')
t3.fill_value= 0.
print(t3)
print(t3.data)
print(t3.fill_value)
print(t3.filled()) # It seems it ignores the fill_value parameter
print(t3.filled(0.))
In Python 2.6 this outputs
c:\python26\python scikits_bug.py
[--]
[ 0.]
0.0
[ 0.]
[ 0.]
, but in Python 2.7 I get:
c:\python27\python scikits_bug.py
[--]
[ 0.]
0.0
[ 1.00000000e+20] # This must be wrong!
[ 0.]
Python 2.6: scikits.timeseries version 0.91.3, numpy 1.3.0
Python 2.7: scikits.timeseries version 0.91.3, numpy 1.5.0
--
Åsmund Hjulstad, asmund at hjulstad.com
More information about the SciPy-Dev
mailing list