C2_W2_Assignment -Exercise 2

Hello,

I don’t wnt to post code here (should nto), so I’m posting only the message I got.
This is exercise 2, from assigment at the end of week 2.

Test case “extra_check”. Wrong output of pred_numpy for X = [-5 0 1 5].
Expected:
[ 0 10 12 20]
Got:
[6.79491035 7.03259355 7.08013019 7.27027675]
3 Tests passed
1 Tests failed

I believe there’s no way the expected output is [0 10 12 20], can you fix please or correct me if i’m wrong

It appears I’m able to get the expected results.

Here is why:
image

You are given these values:
m = 2, b = 10
Then compute the result for each value in X = [-5, 0, 1, 5].
In detail, consider the first X value:
if x is -5, then (m*x + b) = -10 + 10 = 0.

I got the same problem. i am sure you used m_numpy and b_numpy as m and b, while the m and b variables have already been given. So use them.