Error in Week 2 Systems of Linear Equations

Hello everyone!
I don’t know how to fix this


1 Like

i have same errors too, for your code i wrote the following and it passed 4 tests but failed 2

solution removed

2 Likes

Hello @novosadkatie and @Omar_Hosny_Mohamed_M!

As I can see reading the error, the issue might be because of the sintax

A *= B

contained in the code. Please try to use A = A * B

This is not a bug, and it is a rule when casting two vectors, as we can see in numpy source code

Default casting for inplace operations has changed to 'same_kind'. For
> instance, if n is an array of integers, and f is an array of floats, then
> n += f will result in a TypeError, whereas in previous Numpy
versions the floats would be silently cast to ints. In the unlikely case
that the example code is not an actual bug, it can be updated in a backward
compatible way by rewriting it as np.add(n, f, out=n, casting='unsafe').
The old 'unsafe' default has been deprecated since Numpy 1.7.

Finally, please avoid posting solutions to exercises beucause it goes against our community guidelines.

Thanks,
Lucas