Skip to content

Commit b7053de

Browse files
jacoterhscarlehoff
andauthored
Update validphys2/src/validphys/n3fit_data.py
Co-authored-by: Juan M. Cruz-Martinez <juacrumar@lairen.eu>
1 parent ebcd842 commit b7053de

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

validphys2/src/validphys/n3fit_data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,7 @@ def setupfit_fitting_covmat(dataset_inputs_fitting_covmat, diagonal_basis=True):
424424
eig_vals, v = np.linalg.eigh(cormat) # cormat = V @ diag(eig_vals) @ V.T
425425
u = np.einsum("i, ij -> ij", sigma, v)
426426
rec_covmat = u @ np.diag(eig_vals) @ u.T
427-
assert np.allclose(
428-
covmat, rec_covmat
429-
), "Diagonalisation failed to reproduce original covmat"
427+
np.testing.assert_allclose(covmat, rec_covmat, rtol=1e-4, atol=1e-5, err_msg="Diagonalisation failed to reproduce original covmat")
430428

431429
diagonal_rotation = np.einsum("ij, j -> ij", v.T, sigma_inv)
432430

0 commit comments

Comments
 (0)