Skip to content

Commit

Permalink
Make sure some, but not all parameters were updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeda committed Dec 19, 2023
1 parent e128f9b commit f30d83a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit_tests/analysis/test_es_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,9 @@ def g(X):

prior_da = prior.load_parameters(param_group, range(num_ensemble))
posterior_da = posterior_ens.load_parameters(param_group, range(num_ensemble))
# Because of adaptive localization, not all parameters should be updated.
# This would fail if with global updates.
# Make sure some, but not all parameters were updated.
assert not np.allclose(prior_da, posterior_da)
# All parameters would be updated with a global update so this would fail.
assert np.isclose(prior_da, posterior_da).sum() > 0


Expand Down

0 comments on commit f30d83a

Please sign in to comment.