Skip to content

Commit b040e22

Browse files
committed
msm.py: update covariance_mat checks to Enum
Co-authored-by: Marco Favorito <[email protected]> f
1 parent 780cde9 commit b040e22

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

black_it/loss_functions/msm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ def compute_loss_1d(
179179

180180
g = real_mom_1d - sim_mom_1d
181181

182-
if self._covariance_mat == "identity":
182+
if self._covariance_mat == _CovarianceMatrixType.IDENTITY.value:
183183
loss_1d = g.dot(g)
184184
return loss_1d
185-
if self._covariance_mat == "inverse_variance":
185+
if self._covariance_mat == _CovarianceMatrixType.INVERSE_VARIANCE.value:
186186
W = np.diag(
187187
1.0 / np.mean((real_mom_1d[None, :] - ensemble_sim_mom_1d) ** 2, axis=0)
188188
)

0 commit comments

Comments
 (0)