I have a big NumPy array that I want to divide into many subarrays by moving a window of a particular size, here's my code in the case of subarrays of size 11:
import numpy as np
x = np.arange(10000)
T = np.array([])
for i in range(len(x)-11):
s = x[i:i+11]
T = np.concatenate((T, s), axis=0)
But it is very slow for arrays having more than 1 million entries, is there any tip to make it faster?