metic methods. >>> from numpy.linalg import cond >>> cond(a) np.float64(8.659885634118668e+17) # may vary It is also possible to detect ill-conditioning by inspecting the matrix's singular values directly. The ratio between the largest and the smallest singular value is the condition number: >>> from numpy.linalg import svd >>> sigma = svd(a, compute_uv=False) # Do not compute singular vectors >>> sigma.max()/sigma.min() 8.659885634118668e+17 # may vary ú