예제 #1
0
 def test_logpmf_p2(self):
     poisson_pmf = poisson.logpmf(6, 1)
     genpoisson_pmf = genpoisson_p.logpmf(6, 1, 0, 2)
     assert_allclose(poisson_pmf, genpoisson_pmf, rtol=1e-15)
예제 #2
0
 def test_logpmf(self):
     gp_logpmf = genpoisson_p.logpmf(2, 3, 0, 2)
     zigp_logpmf = zigenpoisson.logpmf(2, 3, 0, 2, 0.1)
     assert_allclose(gp_logpmf, zigp_logpmf, rtol=5e-2, atol=5e-2)
예제 #3
0
 def test_logpmf_p1(self):
     poisson_pmf = poisson.logpmf(5, 2)
     genpoisson_pmf = genpoisson_p.logpmf(5, 2, 0, 1)
     assert_allclose(poisson_pmf, genpoisson_pmf, rtol=1e-15)
예제 #4
0
 def test_logpmf_zero(self):
     gp_logpmf = genpoisson_p.logpmf(7, 3, 1, 1)
     zigp_logpmf = zigenpoisson.logpmf(7, 3, 1, 1, 0)
     assert_allclose(gp_logpmf, zigp_logpmf, rtol=1e-12)