Skip to content

Commit

Permalink
Fixed test case
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsch420 committed Oct 30, 2024
1 parent 14139f1 commit faaa566
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_distributions/test_gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def test_sampling_with_infinite_bounds_and_flipping(self):
def test_non_standard_sampling(self):
model = TruncatedGaussianDistribution(self.x, SimpleInterval(-np.inf, -0.1), 0.5, 2)
samples = model.robert_rejection_sample(1000).reshape(-1, 1)
self.assertAlmostEqual(max(samples), -0.1, delta=0.01)
self.assertAlmostEqual(max(samples), -0.1, delta=0.1)
likelihoods = model.likelihood(samples)
self.assertTrue(all(likelihoods > 0))
self.assertAlmostEqual(model.expectation(model.variables)[model.variable], samples.mean(), delta=0.1)
Expand Down

0 comments on commit faaa566

Please sign in to comment.