Given parameters
timestep = 2
window_size = 3
I have flatenned vector of timeseries with size 9.
The content is:
arr = np.array([1,2,3,4,5,6,7,8,9])
How to reshape/construct windowed timeseries with those parameters?
I expect the output will having shape
unknown, window_size)
So, its output would be matrix like this:
windowed_arr = np.array([
[1,2,3],
[3,4,5],
[5,6,7],
[7,8,9]
])