Gaussian elimination in Python