C1_W1_Gradient Descent


Please help on this error

Very simply this error says to you that the variable J should be either a string or a number to be converted to float. So check what J type is and make sure is as needed.

Thanks, I revisited my code. Still it throws and error. Any guidance would be of help.


Your dot matrix calculation is not right it should be np.dot(x,y) where x and y are mock variables in my case.

Are you talking about defining z? I’m going through the instruction and it says -

No the operation itself in the J calculation. It should be np.dot(yt, np.log(…))…