Skip to content

Commit

Permalink
update expected mode values, add atol
Browse files Browse the repository at this point in the history
  • Loading branch information
sschmidt23 committed May 8, 2024
1 parent a154dfe commit e95ae06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def test_bpz_lite():
'hdf5_groupname': 'photometry',
'nt_array': [8],
'model': 'testmodel_bpz.pkl'}
zb_expected = np.array([0.16, 0.12, 0.14, 0.14, 0.06, 0.14, 0.12, 0.14, 0.06, 0.16])
zb_expected = np.array([0.16, 0.12, 0.0, 0.12, 0.05, 0.14, 0.11, 0.14, 0.05, 0.16])
train_algo = None
pz_algo = bpz_lite.BPZliteEstimator
results, rerun_results, rerun3_results = one_algo("BPZ_lite", train_algo, pz_algo, train_config_dict, estim_config_dict)
assert np.isclose(results.ancil['zmode'], zb_expected).all()
assert np.isclose(results.ancil['zmode'], zb_expected, atol=0.03).all()
assert np.isclose(results.ancil['zmode'], rerun_results.ancil['zmode']).all()

@pytest.mark.parametrize(
Expand Down

0 comments on commit e95ae06

Please sign in to comment.