Exemplo n.º 1
0
 def test_rvs(self):
     for low, high, q in [(0, 1, .1),
                          (-20, 4, 3),]:
         qlu = qloguniform_gen(low, high, q)
         tdb.check_ppf_ppf(qlu, ())
         tdb.check_cdf_ppf(qlu, (), '')
         try:
             check_d_samples(qlu, n=10000)
         except:
             print low, high, q
             raise
Exemplo n.º 2
0
 def test_2points(self):
     low, high, q = (np.log(.05), np.log(.75), 0.5)
     qlu = qloguniform_gen(low, high, q)
     check_d_samples(qlu, n=10000)
Exemplo n.º 3
0
 def test_bigq(self):
     low, high, q = (-20, 4, 3)
     qlu = qloguniform_gen(low, high, q)
     check_d_samples(qlu, n=10000)
Exemplo n.º 4
0
 def test_smallq(self):
     low, high, q = (0, 1, .1)
     qlu = qloguniform_gen(low, high, q)
     check_d_samples(qlu, n=10000)
Exemplo n.º 5
0
 def logp(self, x, low, high, q):
     return qloguniform_gen(low, high, q).logpmf(x)
Exemplo n.º 6
0
 def test_output_type_float(self):
     assert float == type(qloguniform_gen(0, 10, 1.0).rvs())
Exemplo n.º 7
0
 def test_output_type_int(self):
     result = qloguniform_gen(0, 10, 1).rvs()
     assert int == type(result)