INNER CODE UNIT · Python

moving_std

matrix-profile-foundation/matrixprofile · matrixprofile/core.py:300

def moving_std(a, window=3):
    """
    Computes the moving 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 std. over the array.
    """
    return np.std(rolling_window(a, window), -1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…