Skip to content

Commit

Permalink
msm.py: update covariance_mat checks to Enum
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Favorito <[email protected]>
  • Loading branch information
AldoGl and marcofavoritobi authored Dec 12, 2022
1 parent 80c7805 commit 7a74765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions black_it/loss_functions/msm.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ def compute_loss_1d(

g = real_mom_1d - sim_mom_1d

if self._covariance_mat == "identity":
if self._covariance_mat == _CovarianceMatrixType.IDENTITY:
loss_1d = g.dot(g)
return loss_1d
if self._covariance_mat == "inverse_variance":
if self._covariance_mat == _CovarianceMatrixType.INVERSE_VARIANCE:
W = np.diag(
1.0 / np.mean((real_mom_1d[None, :] - ensemble_sim_mom_1d) ** 2, axis=0)
)
Expand Down

0 comments on commit 7a74765

Please sign in to comment.