_find_end_indices#

pytorch_forecasting.data.timeseries._find_end_indices(diffs: ndarray, max_lengths: ndarray, min_length: int) Tuple[ndarray, ndarray][source]#

Identify end indices in series even if some values are missing.

Parameters:
  • diffs (np.ndarray) – array of differences to next time step. nans should be filled up with ones

  • max_lengths (np.ndarray) – maximum length of sequence by position.

  • min_length (int) – minimum length of sequence.

Returns:

tuple of arrays where first is end indices and second is list of start

and end indices that are currently missing.

Return type:

Tuple[np.ndarray, np.ndarray]