I am trying to vectorize the following loop in I am trying to append multiple arrays to an empty array.
# ff is a matrix of shape [100,1,96]
temp = np.array([]).reshape(0,96)
for kk in range(1,10,1):
temp = np.append(tr,ff[kk],axis=0)
temp = temp.reshape(1,10,96)
Is it possible to vectorize the above loop using numpy? Any help is welcome!
ff[:10,:,:]just give you the data you are looking for?