diff --git a/docs/pyerrors/fits.html b/docs/pyerrors/fits.html
index 44cab416..c8280931 100644
--- a/docs/pyerrors/fits.html
+++ b/docs/pyerrors/fits.html
@@ -353,7 +353,7 @@
new_jac = np.concatenate((fused_row1, fused_row2), axis=1)
A = W @ new_jac
- P_phi = A @ np.linalg.inv(A.T @ A) @ A.T
+ P_phi = A @ np.linalg.pinv(A.T @ A) @ A.T
expected_chisquare = np.trace((np.identity(P_phi.shape[0]) - P_phi) @ W @ cov @ W)
if expected_chisquare <= 0.0:
warnings.warn("Negative expected_chisquare.", RuntimeWarning)
@@ -632,7 +632,7 @@
W = np.diag(1 / np.asarray(dy_f))
cov = covariance(y)
A = W @ jacobian(func)(fit_result.x, x)
- P_phi = A @ np.linalg.inv(A.T @ A) @ A.T
+ P_phi = A @ np.linalg.pinv(A.T @ A) @ A.T
expected_chisquare = np.trace((np.identity(x.shape[-1]) - P_phi) @ W @ cov @ W)
output.chisquare_by_expected_chisquare = chisquare / expected_chisquare
if not silent:
@@ -1216,7 +1216,7 @@ If True, a quantile-quantile plot of the fit result is generated (default False)
new_jac = np.concatenate((fused_row1, fused_row2), axis=1)
A = W @ new_jac
- P_phi = A @ np.linalg.inv(A.T @ A) @ A.T
+ P_phi = A @ np.linalg.pinv(A.T @ A) @ A.T
expected_chisquare = np.trace((np.identity(P_phi.shape[0]) - P_phi) @ W @ cov @ W)
if expected_chisquare <= 0.0:
warnings.warn("Negative expected_chisquare.", RuntimeWarning)