Skip to content

Commit

Permalink
fix up doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
kratsg committed Jan 16, 2021
1 parent 310829e commit eeb35c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pyhf/infer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def create_calculator(calctype, *args, **kwargs):
>>> observations = [51, 48]
>>> data = observations + model.config.auxdata
>>> mu_test = 1.0
>>> null_mu = 0.0
>>> toy_calculator = pyhf.infer.utils.create_calculator(
... "toybased", data, model, ntoys=100, test_stat="qtilde", track_progress=False
... "toybased", data, model, ntoys=100, test_stat="qtilde", track_progress=False, null_mu=0.0
... )
>>> qmu_sig, qmu_bkg = toy_calculator.distributions(mu_test)
>>> qmu_sig, qmu_bkg = toy_calculator.distributions(mu_test, null_mu)
>>> qmu_sig.pvalue(mu_test), qmu_bkg.pvalue(mu_test)
(0.14, 0.76)
Expand Down

0 comments on commit eeb35c5

Please sign in to comment.