INNER CODE UNIT · Python
strides
matrix-profile-foundation/matrixprofile · matrixprofile/core.py:277
strides = a.strides + (a.strides[-1],)
return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides)
def moving_average(a, window=3):
"""
Computes the moving average over an array given a window size.
Parameters
----------
a : array_like
The array to compute the moving average on.
window : int
The window size.
Returns
-------