Skip to content

Commit

Permalink
test(backport): Lower tolerance for iminuit v2.26.0+ on Apple silicon (
Browse files Browse the repository at this point in the history
…#2515)

* Backport PR #2514
* Lower the tolerance for the tests/test_optim.py test_optim_uncerts test
  to reach agreement for iminuit v2.26.0+ on Apple silicon.

Co-authored-by: Matthew Feickert <matthew.feickert@cern.ch>
  • Loading branch information
meeseeksmachine and matthewfeickert committed Jun 7, 2024
1 parent 2ee885c commit 13e3877
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ def test_optim_uncerts(backend, source, spec, mu):
return_uncertainties=True,
)
assert result.shape == (2, 2)
assert pytest.approx([0.26418431, 0.0]) == pyhf.tensorlib.tolist(result[:, 1])
assert pytest.approx([0.26418431, 0.0], rel=1e-5) == pyhf.tensorlib.tolist(
result[:, 1]
)


@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
Expand Down

0 comments on commit 13e3877

Please sign in to comment.