Skip to content

Commit

Permalink
tiny fix for a posteriori pyhf likelihoods
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangWaltenberger committed Jan 26, 2025
1 parent 0d452cc commit 4151cdf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions smodels/statistics/pyhfInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,9 @@ def clsRoot(mu : float ) -> float:
logger.debug("expected = {}, mu = {}, result = {}".format(expected, mu, result))
try:
CLs = float(result[1].tolist())
except TypeError:
CLs = float(result[1][0])
except (IndexError,TypeError):
CLs = float(result)
# CLs = float(result[1][0])
else:
logger.debug("expected = {}, mu = {}, result = {}".format(expected, mu, result))
CLs = float(result)
Expand Down

0 comments on commit 4151cdf

Please sign in to comment.