C1W2 Exercise 2 Some Tests failing

I have been trying to solve this error for weeks now and finally decided to post it here as I couldn’t find any solution

Wrong output for test case check_matrix_1.
Expected:
[-0.33333333 -1.33333333 2.33333333].
Got:
[4. 1.7 2.33333333].
Wrong output for test case check_matrix_2.
Expected:
[0.7857143 1.64285714 0. ].
Got:
[9. 1.64285714 0. ].
Wrong output for test case check_matrix_3.
Expected:
[19. -2. 1.].
Got:
[9. 6. 1.].
1 Tests passed
3 Tests failed

Everytime I try to execute this happens. Where could the error possibly be in the code to get an error of this sort ?

Thanks in advance…

Hi @ShamalLakshan ,

You code seems to have problems with calculations (dimensions are OK). Make sure to do Matrix Operations correctly! (Based on given formulas)

Debug your code and go through your code step-by-step to find the problem. If the issue persists you can send your code in private message (not here!) so we can work it out together!