IndexError: index 1 is out of bounds for axis 0 with size 1

Please, how can I fix this problem

Hello @Marwane_Khadrouf,

Could you share your notebook with me in a private message?

1 Like

Can you please share code of yourcompute_cost() function and the X_train array’s values.

It seems like you using the Index which is more than the actual length of the array, I think it might because of X_train’s shape.

1 Like

Hello, thank you I fix the problem :blush:

Hello, I fix the problem, thank you very much