INNER CODE UNIT · Python
moving_min
matrix-profile-foundation/matrixprofile · matrixprofile/core.py:340
def moving_min(a, window=3):
"""
Computes the moving minimum over an array given a window size.
Parameters
----------
a : array_like
The array to compute the moving min on.
window : int
The window size.
Returns
-------
array_like :
The array of moving minimums.
"""
return np.min(rolling_window(a, window), axis=1)