Example #1
0
 def test_get_sample(self):
     r = Relationship(utils.straight_line,
                      TEST_X,
                      TEST_Y,
                      bounds=((0, 10), (-1, 1)))
     r.nested_sampling(maxiter=100, progress=False)
     assert_equal(isinstance(r.get_sample(1), list), True)
Example #2
0
 def test_nested_sampling_done(self):
     r = Relationship(utils.straight_line,
                      TEST_X,
                      TEST_Y,
                      bounds=((0, 10), (-1, 1)))
     r.nested_sampling(maxiter=100, progress=False)
     assert_equal(r.nested_sampling_done, True)
Example #3
0
 def test_nested_sampling(self):
     r = Relationship(utils.straight_line,
                      TEST_X,
                      TEST_Y,
                      bounds=((0, 10), (-1, 1)))
     r.nested_sampling(maxiter=100, progress=False)
     assert_equal(isinstance(r.variables[0], Distribution), True)
     assert_equal(isinstance(r.variables[1], Distribution), True)
     assert_equal(r.variables[0].min > 0, True)
     assert_equal(r.variables[0].max < 10, True)
     assert_equal(r.variables[1].min > -1, True)
     assert_equal(r.variables[1].max < 1, True)