def _check_window_params(data, window_length):
    if window_length < 1:
        raise WindowLengthNotPositive(window_length=window_length)

    if window_length > data.shape[0]:
        raise WindowLengthTooLong(
            nrows=data.shape[0],
            window_length=window_length,
        )
Check that a window of length `window_length` is well-defined on `data`.
dataset/ETHPy150Open quantopian/zipline/zipline/lib/adjusted_array.py/_check_window_params