Beispiel #1
0
 def test_pndist(self):
     assert_dists_are_equivalent(
         activity._check_distro(dist.normal, mu=0, sigma=1),
         stats.norm(0, 1))
Beispiel #2
0
 def test_pndist_as_class(self):
     assert activity._check_distro(dist.normal,
                                   as_class=True) == dist.normal
Beispiel #3
0
 def test_string_good_as_class(self):
     assert activity._check_distro('normal', as_class=True) == dist.normal
Beispiel #4
0
 def test_string_bad(self):
     with pytest.raises(ValueError):
         activity._check_distro('junk')
Beispiel #5
0
 def test_number(self):
     with pytest.raises(ValueError):
         activity._check_distro(45)
Beispiel #6
0
 def test_number(self):
     activity._check_distro(45)
Beispiel #7
0
 def test_scipy_dist(self):
     assert_dists_are_equivalent(
         activity._check_distro(stats.lognorm(s=2)),
         stats.lognorm(s=2)
     )
Beispiel #8
0
 def test_string_good_as_class(self):
     assert activity._check_distro('normal', as_class=True) == dist.normal
Beispiel #9
0
 def test_pndist(self):
     assert_dists_are_equivalent(
         activity._check_distro(dist.normal, mu=0, sigma=1),
         stats.norm(0, 1)
     )
Beispiel #10
0
 def test_number(self):
     with pytest.raises(ValueError):
         activity._check_distro(45)
Beispiel #11
0
 def test_pndist_as_class(self):
     assert activity._check_distro(dist.normal, as_class=True) == dist.normal
Beispiel #12
0
 def test_string_bad(self):
     with pytest.raises(ValueError):
         activity._check_distro('junk')
Beispiel #13
0
 def test_string_good_as_class(self):
     nt.assert_equal(activity._check_distro('normal', as_class=True), dist.normal)
Beispiel #14
0
 def test_pndist_as_class(self):
     nt.assert_equal(activity._check_distro(dist.normal, as_class=True), dist.normal)
Beispiel #15
0
 def test_string(self):
     assert_dists_are_equivalent(
         activity._check_distro('normal', mu=0, sigma=1), stats.norm(0, 1))
Beispiel #16
0
 def test_string(self):
     assert_dists_are_equivalent(
         activity._check_distro('normal', mu=0, sigma=1),
         stats.norm(0, 1)
     )
Beispiel #17
0
 def test_scipy_dist(self):
     assert_dists_are_equivalent(activity._check_distro(stats.lognorm(s=2)),
                                 stats.lognorm(s=2))
Beispiel #18
0
 def test_string_bad(self):
     activity._check_distro('junk')