TMosh
May 14, 2024, 10:54pm
23
The most common issue here is indentation. It’s particularly tricky with the nested for-loops that you’re asked to use.
The “Click for hints” and “Click for more hints” links essentially give you all the code - but it’s still easy to get the indentation wrong.
1 Like
ilsa
May 15, 2024, 2:46pm
24
AssertionError Traceback (most recent call last)
in
8
9 # UNIT TESTS
—> 10 compute_cost_test(compute_cost)
~/work/public_tests.py in compute_cost_test(target)
24 b = 0
25 result = target(X, y, w, b)
—> 26 assert np.isclose(result, 2.15510667), f"Wrong output. Expected: {2.15510667} got: {result}"
27
28 X = np.random.randn(4, 3)
AssertionError: Wrong output. Expected: 2.15510667 got: 1.597429473694739
ilsa
May 15, 2024, 2:54pm
25
Error message refers to lines of code outside the START CODE and END CODE area where I’m expected to make any modifications. And this practice lab is taking so long.
How can I move forward?
TMosh
May 15, 2024, 4:01pm
26
The error message is being thrown by code that is testing the return value from your compute_cost() function.
Check your personal messages for instructions.