Skip to content

Commit

Permalink
Use np.allclose instead of np.array_equal
Browse files Browse the repository at this point in the history
  • Loading branch information
kvashchuka committed Oct 13, 2023
1 parent 11ddac9 commit b3b51f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit_tests/analysis/test_adaptive_localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_that_adaptive_localization_with_cutoff_1_equals_ensemble_prior(copy_cas
prior_sample, posterior_sample = run_cli_ES_with_case("poly_loc_1.ert")

# Check prior and posterior samples are equal
assert np.array_equal(posterior_sample, prior_sample)
assert np.allclose(posterior_sample, prior_sample)


@pytest.mark.integration_test
Expand Down Expand Up @@ -97,4 +97,4 @@ def test_that_adaptive_localization_with_cutoff_0_equals_ESupdate(copy_case):
prior_sample_noloc, posterior_sample_noloc = run_cli_ES_with_case("poly_no_loc.ert")

# Check posterior sample without adaptive localization and with cut-off 0 are equal
assert np.allclose(posterior_sample_loc0, posterior_sample_noloc, rtol=1e-08, atol=1e-08)
assert np.allclose(posterior_sample_loc0, posterior_sample_noloc)

0 comments on commit b3b51f1

Please sign in to comment.