DLS Course 1 - Practice Programming Assignment - Excercise 8

Below is the error I got:

L1 = [0.1 0.2 0.1 0.6 0.1]
Error: The function should return a float.
Error: Wrong output
0 Tests passed
2 Tests failed

I tried to convert both the inputs (i.e. yhat, y) as floats but still it is showing this error. I am not sure why? Also, in the output it can be clearly seen that the output is a float.

Function L1 should return a float and not a list. You are missing a step.

1 Like