Exemplo n.º 1
0
 def test_gauss_jordan(self):
     from gauss_jordan import input_data, solve
     to_str = lambda a: ' '.join((str(i) for i in a))
     a, b = input_data(['', to_str(self.a), to_str(self.b)])
     a_out, b_out = solve(a, b)
     self.assertEqual(b_out, [0.5, -0.5, 0.0])
Exemplo n.º 2
0
 def test_gauss_jordan_functional(self):
     from gauss_jordan_functional import solve
     a_out, b_out = solve(self.abn)
     self.assertEqual(b_out, [0.5, -0.5, 0.0])