When "n" is small, like 4, the result is good.
But when I choose an "n" greater than 10, the test result is like the following:
FAIL: test_gauss_seidel (main.TestSolver)
Traceback (most recent call last):
File "test_homework2.py", line 133, in test_gauss_seidel
self.assertLess(error, 1e-8)
AssertionError: 1.510871028108888e-08 not less than 1e-08
I used "do while" loop for iterations in both my jacobi and gauss seidel methods, which may be an issue. So I tried "while" loop but it didn't help solving this issue.
Could you take a look at my code and give me some hints about it?
When "n" is small, like 4, the result is good. But when I choose an "n" greater than 10, the test result is like the following:
FAIL: test_gauss_seidel (main.TestSolver)
Traceback (most recent call last): File "test_homework2.py", line 133, in test_gauss_seidel self.assertLess(error, 1e-8) AssertionError: 1.510871028108888e-08 not less than 1e-08
I used "do while" loop for iterations in both my jacobi and gauss seidel methods, which may be an issue. So I tried "while" loop but it didn't help solving this issue. Could you take a look at my code and give me some hints about it?