# Understanding LSTM input shape for keras

I am learning about the LSTM network. The input needs to be 3D. So I have a CSV file which has 9999 data with one feature only. So it is only one file.

So usually it is (9999,1) then I reshape with time steps 20 steps

timesteps = 20
dim = data.shape[1]
data.reshape(len(data),timesteps,dim)


but I am getting following error

ValueError: cannot reshape array of size 9999 into shape (9999,20,1)

and the input in LSTM

model.add(LSTM(50,input_shape=(timesteps,dim),return_sequences=True, activation="sigmoid"))