EvaluationWindows.cut#

EvaluationWindows.cut(values, dtype)[source]#

Cut a date-first array into one padded window per period.

Parameters:
valuesnp.ndarray

Array with date as its first axis, shape (n_dates, *rest).

dtypestr

NumPy dtype of the output.

Returns:
np.ndarray

Shape (n_periods, max_window, *rest). Positions beyond a window’s own length are zero; they exist only so windows of different lengths stack, and no evaluated date reaches them, since the filters involved look backwards.