@pytest.mark.skipif(u'not HAS_SCIPY')
def test_poisson_conf_frequentist_confidence_gehrels_3sigma():
 nlh = np.array([(0, 3, 0, 6.608), (1, 3, 0.00135, 8.9), (2, 3, 0.0529, 10.87), (3, 3, 0.212, 12.68), (4, 3, 0.465, 14.39), (5, 3, 0.792, 16.03), (6, 3, 1.175, 17.62), (7, 3, 1.603, 19.17), (8, 3, 2.068, 20.69), (9, 3, 2.563, 22.18), (10, 3, 3.084, 23.64)])
 assert_allclose(funcs.poisson_conf_interval(nlh[:, 0], sigma=3, interval=u'frequentist-confidence').T, nlh[:, 2:], rtol=0.01, verbose=True)

@ pytest . mark . skipif ( u'not HAS_SCIPY' ) def test_poisson_conf_frequentist_confidence_gehrels_3sigma ( ) : nlh = np . array ( [ ( 0 , 3 , 0 , 6.608 ) , ( 1 , 3 , 0.00135 , 8.9 ) , ( 2 , 3 , 0.0529 , 10.87 ) , ( 3 , 3 , 0.212 , 12.68 ) , ( 4 , 3 , 0.465 , 14.39 ) , ( 5 , 3 , 0.792 , 16.03 ) , ( 6 , 3 , 1.175 , 17.62 ) , ( 7 , 3 , 1.603 , 19.17 ) , ( 8 , 3 , 2.068 , 20.69 ) , ( 9 , 3 , 2.563 , 22.18 ) , ( 10 , 3 , 3.084 , 23.64 ) ] ) assert_allclose ( funcs . poisson_conf_interval ( nlh [ : , 0 ] , sigma = 3 , interval = u'frequentist-confidence' ) . T , nlh [ : , 2 : ] , rtol = 0.01 , verbose = True )
test intervals against those published in gehrels 1986 .