Exemplo n.º 1
0
 def test_distribution(self):
     priors = [0.0 for i in range(7)]
     priors[3] = 1.0
     posts = b.gsbin(priors,1.0)
     mn = 0.005
     mx = 0.4
     for p in posts:
         self.assertTrue(mn <= p <= mx)
     self.assertEqual(max(posts), posts[3])
Exemplo n.º 2
0
 def test_uniforms(self):
     priors = [1.0 for i in range(50)]
     posts = b.gsbin(priors, 1.0)
     for p in posts:
         self.assertEqual(1.0, p)