import numpy as np from gauss import solve a = np.array([[1, 1.0 / 4, 0, 0], [1, 5.0 / 4, 12, 0], [1, 1.0 / 3, 1, 1], [1, 5.0 / 4, 13, 1]]) b = np.array([0, 0, 1e16, 0]) x_gauss = solve(a, b) x = np.array([-3e16, 1.2e17, -1e16, 1e16]) print "Norme de l'erreur (pivot partiel) :", np.linalg.norm(x - x_gauss)