ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 3 dimension(s) and the array at index 1 has 2 dime

Viewed 36

Appreciate your input, as I am new to python. I got confused at the last part of my model. I have a problem with shapes.

 # make a prediction
    yhat = model.predict(test_X)
    test_X_data = test_X.reshape((test_X.shape[0], test_X.shape[2]))
    # invert scaling for forecast
    inv_yhat = concatenate((yhat, test_X_data[:, 1:]), axis=1)

This is the error message:

ValueError: all the input arrays must have same number of dimensions, but the array at index 0 has 3 dimension(s) and the array at index 1 has 2 dime
0 Answers
Related