def _chunk_sums(array: np.ndarray, chunk_size: int) -> np.ndarray:
    r"""Splits an array into chunks and returns the sum of each chunk.

    Incomplete chunks are discarded"""
    n_chunks = array.size // chunk_size
    n_elems = n_chunks * chunk_size
    return array[:n_elems].reshape(n_chunks, chunk_size).sum(axis=1)
Splits an array into chunks and returns the sum of each chunk.

    Incomplete chunks are discarded
python/statsforecast/models.py