Python Forum

Full Version: I am getting invalid syntax.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can you please tell me how to check the values of j:j+(nb_features-1)*timestep+1:timestep for each value of j=0,1,2,3 in python.This expression is an index of a numpy array X as mentioned in a loop given below.
for j in range(0,timestep):

       X_reshape[:,j,:] = X[:,j:j+(nb_features-1)*timestep+1:timestep]
X_reshape is a numpy array with shape (21025,4,50) containing zeros and X is a numpy array with shape (21025,200) which can be assumed as containing integer values. In the above example nb_features=50 and timestep=4.