INNER CODE UNIT · Python

moving_max

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

def moving_max(a, window=3):
    """
    Computes the moving maximum over an array given a window size.

    Parameters
    ----------
    a : array_like
        The array to compute the moving max on.
    window : int
        The window size.

    Returns
    -------
    array_like :
        The array of moving maximums.
    """
    return np.max(rolling_window(a, window), axis=1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…