I have a ndimensional array with shape (30,2,2) and 2000 elements. So my final array is of shape (2000, 30, 2, 2). I now want to stack rolling 200 elements in a new array. So I assume my final array will look something like (1801, 200, 30, 2, 2) where each element in 1800 has 200 samples of (30,2,2) arrays. How do you create this rolling window in python. I have tried using vstack but not entirely sure how I achieve my desired results.
import numpy as np
input = np.zeros((2000, 30, 2, 2))
desired_output = np.zeros((1801, 200, 30, 2, 2))