@pytest.mark.skipif(u'not HAS_SCIPY')
def test_poisson_conf_frequentist_confidence_gehrels_2sigma():
 nlh = np.array([(0, 2, 0, 3.783), (1, 2, 0.023, 5.683), (2, 2, 0.23, 7.348), (3, 2, 0.596, 8.902), (4, 2, 1.058, 10.39), (5, 2, 1.583, 11.82), (6, 2, 2.153, 13.22), (7, 2, 2.758, 14.59), (8, 2, 3.391, 15.94), (9, 2, 4.046, 17.27), (10, 2, 4.719, 18.58)])
 assert_allclose(funcs.poisson_conf_interval(nlh[:, 0], sigma=2, interval=u'frequentist-confidence').T, nlh[:, 2:], rtol=0.01)

@ pytest . mark . skipif ( u'not HAS_SCIPY' ) def test_poisson_conf_frequentist_confidence_gehrels_2sigma ( ) : nlh = np . array ( [ ( 0 , 2 , 0 , 3.783 ) , ( 1 , 2 , 0.023 , 5.683 ) , ( 2 , 2 , 0.23 , 7.348 ) , ( 3 , 2 , 0.596 , 8.902 ) , ( 4 , 2 , 1.058 , 10.39 ) , ( 5 , 2 , 1.583 , 11.82 ) , ( 6 , 2 , 2.153 , 13.22 ) , ( 7 , 2 , 2.758 , 14.59 ) , ( 8 , 2 , 3.391 , 15.94 ) , ( 9 , 2 , 4.046 , 17.27 ) , ( 10 , 2 , 4.719 , 18.58 ) ] ) assert_allclose ( funcs . poisson_conf_interval ( nlh [ : , 0 ] , sigma = 2 , interval = u'frequentist-confidence' ) . T , nlh [ : , 2 : ] , rtol = 0.01 )
test intervals against those published in gehrels 1986 note: i think theres a typo in gehrels 1986 .