Skip to content
Advertisement

What does ‘index 0 is out of bounds for axis 0 with size 0’ mean and how can I fix this error?

I am running a certain stoke prediction model code and getting the following error.

I have given below the code.

JavaScript

This is the error I am getting:

JavaScript

Is there anyway to resolve this error? I will share more dependencies information if required.

Advertisement

Answer

pred_price is an empty np.array so trying to index it like you have done on line 9 (“pred_price[0]“) will give an error. There has to be something in the array first.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement