Lab 4 numpy error

Hello all,

It appears to be the optional lab for Gradient Descent. However, @teniza_bhujel might somehow have changed the name of the notebook to “Untitled2”.

From the traceback, there is the problem:

@teniza_bhujel might again have somehow changed y[i] into y(i) and that caused the error because y is a numpy.ndarray object and the parenthesis made it a call. Changing it back to square brackets will solve the problem.

@teniza_bhujel, you are not asked to change any code for running an optional lab, but I agree that it is sometimes useful to experiment, so be careful when editing the code, but if you think you have not edited anything and want to have the original lab notebook back, you may check out B5 of the MLS FAQ for further instructions.


1 Like