Skip to content

Commit eeb35c5

Browse files
committed
fix up doctest
1 parent 310829e commit eeb35c5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pyhf/infer/utils.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ def create_calculator(calctype, *args, **kwargs):
2828
>>> observations = [51, 48]
2929
>>> data = observations + model.config.auxdata
3030
>>> mu_test = 1.0
31+
>>> null_mu = 0.0
3132
>>> toy_calculator = pyhf.infer.utils.create_calculator(
32-
... "toybased", data, model, ntoys=100, test_stat="qtilde", track_progress=False
33+
... "toybased", data, model, ntoys=100, test_stat="qtilde", track_progress=False, null_mu=0.0
3334
... )
34-
>>> qmu_sig, qmu_bkg = toy_calculator.distributions(mu_test)
35+
>>> qmu_sig, qmu_bkg = toy_calculator.distributions(mu_test, null_mu)
3536
>>> qmu_sig.pvalue(mu_test), qmu_bkg.pvalue(mu_test)
3637
(0.14, 0.76)
3738

0 commit comments

Comments
 (0)