INNER CODE UNIT · Python
moving_avg_std
matrix-profile-foundation/matrixprofile · matrixprofile/core.py:318
def moving_avg_std(a, window=3):
"""
Computes the moving avg and std. over an array given a window size.
Parameters
----------
a : array_like
The array to compute the moving std. on.
window : int
The window size.
Returns
-------
The moving avg and std. over the array as a tuple.
(avg, std)
"""
a = a.astype('d')
mu, sig = cycore.moving_avg_std(a, window)