Skip to content

Commit

Permalink
Apply Alex's readability comment
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Aug 16, 2023
1 parent 6871bf1 commit 6cd5366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyhf/optimize/opt_minuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ def _minimize(
fitresult (scipy.optimize.OptimizeResult): the fit result
"""
maxiter = options.pop('maxiter', self.maxiter)
# int(not do_grad) results in iminuit.Minuit.strategy of either:
# do_grad value results in iminuit.Minuit.strategy of either:
# 0: Fast. Does not check a user-provided gradient.
# 1: Default. Checks user-provided gradient against numerical gradient.
strategy = options.pop("strategy", self.strategy)
# Guard against None from either self.strategy defaulting to None or
# passing strategy=None as options kwarg
if strategy is None:
strategy = int(not do_grad)
strategy = 0 if do_grad else 1
tolerance = options.pop('tolerance', self.tolerance)
if options:
raise exceptions.Unsupported(
Expand Down

0 comments on commit 6cd5366

Please sign in to comment.