So pretend I have this NumPy array:
array = np.array([0,1,2,3,4])
And I want to get all the different sub-arrays with length 3 inside it. The result would look like this:
[[0,1,2], [1,2,3], [2,3,4]]
How can I achieve that?
So pretend I have this NumPy array:
array = np.array([0,1,2,3,4])
And I want to get all the different sub-arrays with length 3 inside it. The result would look like this:
[[0,1,2], [1,2,3], [2,3,4]]
How can I achieve that?