[SciPy-user] incompatible sizes when correlating two timeseries

Bastian Weber bastian.weber@gmx-topmail...
Thu Dec 18 11:15:35 CST 2008


Hi Timmie,

I think the error is somewhere hidden in your data. Try to reproduce the
error with much smaller time series, or with a part of yours. Say
size=(10,) or even less, and then represent them as string to examine
the problem.

At least np.correlate(z, z) should work with z=x or z=y, does it not?

Bastian.

Timmie wrote:
> Hello,
> I try to correlate two timeseries.
> 
> I don not understand, why I get an error for incompatile size.
> 
> both have the same frequencies.
> 
> 
> In [54]: x = series_01
> 
> In [55]: y = series_02
> 
> In [56]: diff = y.size-x.size
> 
> In [57]: diff
> Out[57]: 0
> 
> In [58]: x.shape
> Out[58]: (15360,)
> 
> In [59]: y.shape
> Out[59]: (15360,)
> 
> In [60]: np.correlate(x, y)
> ---------------------------------------------------------------------------
> TimeSeriesCompatibilityError              Traceback (most recent call last)
> 
> D:\python\test.py
> in <module>()
> ----> 1
>       2
>       3
>       4
>       5
> 
> ...



More information about the SciPy-user mailing list