[SciPy-user] timeseries - mov_average_expw alters it's input
Fri May 8 11:47:27 CDT 2009
That should be fixed in the SVN (r2187). Do you want to give it a try ?
Thanks a lot again for reporting.
On May 8, 2009, at 9:21 AM, Dave Hirschfeld wrote:
> As demonstrated below the mov_average_expw function changes its
> input series.
> Is this known or expected behaviour or a bug? I'd venture to suggest
> it's a
> little surprising, especially for new users.
> from copy import deepcopy
> import numpy.ma as ma
> from numpy.random import rand
> import scikits.timeseries as ts
> from scikits.timeseries.lib.moving_funcs import mov_average_expw
> N = 256
> series = ts.time_series(rand(N),
> series[96:128] = ma.masked
> original_series = deepcopy(series)
> filtered_series = mov_average_expw(series,16)
> assert (series.mask == original_series.mask).all()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> assert (filtered_series.mask == series.mask).all()
> import numpy as np; np.__version__
> SciPy-user mailing list
More information about the SciPy-user