Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 12, 2024
1 parent a3afc50 commit 8a60b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def test_options():
# simple example of uniform pdf with bounds on b to show tolerance
# can be improved with options
def density(x, b):
return b, np.full_like(x,b)
return b, np.full_like(x, b)

# with empty data, b=0
c = cost.ExtendedUnbinnedNLL([], density)
Expand All @@ -273,10 +273,10 @@ def density(x, b):
# try using scipy options to show it is better
c = cost.ExtendedUnbinnedNLL([], density)

m = Minuit(c,b=0)
m = Minuit(c, b=0)
m.limits["b"] = (0, None)

m.scipy(method="Powell", options = {"xtol":1e-10, "ftol": 1e-10})
m.scipy(method="Powell", options={"xtol": 1e-10, "ftol": 1e-10})
b_with_options = m.values["b"]

assert b_without_options > b_with_options

0 comments on commit 8a60b49

Please sign in to comment.