Gauss Jordan Method Definition Python