diff --git a/pyerrors/fits.py b/pyerrors/fits.py index 0bf7723c..f97665c8 100644 --- a/pyerrors/fits.py +++ b/pyerrors/fits.py @@ -486,7 +486,7 @@ def _standard_fit(x, y, func, silent=False, **kwargs): condn = np.linalg.cond(corr) if condn > 0.1 / np.finfo(float).eps: raise Exception(f"Cannot invert correlation matrix as its condition number exceeds machine precision ({condn:1.2e})") - if condn > 1 / np.sqrt(np.finfo(float).eps): + if condn > 1e13: warnings.warn("Correlation matrix may be ill-conditioned, condition number: {%1.2e}" % (condn), RuntimeWarning) chol = np.linalg.cholesky(corr) chol_inv = scipy.linalg.solve_triangular(chol, covdiag, lower=True)