(arr, idx, win_size)
return nfinite, result
Recalculate the window min based on data, index and window size.
Recalculate the window min based on data, index and window size.
Recalculate the window min based on data index and window size .
def calc_min(arr, idx, win_size):
    """Recalculate the window min based on data, index and window size."""
    start = max(0, idx - win_size + 1)
    nfinite = 0
    result = numpy.nan
    for i in range(start, idx + 1):
        value = arr[i]
        nfinite, result = put_min(value, nfinite, result)

    return nfinite, result
def calc_min ( arr , idx , win_size ) : start = max ( 0 , idx - win_size + 1 ) nfinite = 0 result = numpy . nan for i in range ( start , idx + 1 ) : value = arr [ i ] nfinite , result = put_min ( value , nfinite , result ) return nfinite , result