def test(self): rhs = self.rhs sol = self.sol Ainv = Pardiso(self.A, is_symmetric=True) for i in range(3): self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL) self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL) Ainv.clean()
def test(self): rhs = self.rhs sol = self.sol Ainv = Pardiso(self.A, is_symmetric=True, check_accuracy=True) self.assertRaises(Exception, lambda: Ainv * rhs) Ainv.clean() Ainv = Pardiso(self.A) for i in range(3): self.assertLess(np.linalg.norm(Ainv * rhs[:, i] - sol[:, i]), TOL) self.assertLess(np.linalg.norm(Ainv * rhs - sol, np.inf), TOL) Ainv.clean()