Skip to content

Commit 5de4221

Browse files
authored
Adjust precision in NormalSampler test assertions
Updated decimal precision for mean and std assertions in NormalSampler tests.
1 parent 6723677 commit 5de4221

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_pgbart.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ def test_discrete_uniform():
7474
def test_normal_sampler():
7575
normal = NormalSampler(2, shape=1)
7676
samples = np.array([normal.rvs() for i in range(100000)])
77-
np.testing.assert_almost_equal(samples.mean(), 0, decimal=2)
78-
np.testing.assert_almost_equal(samples.std(), 2, decimal=2)
77+
np.testing.assert_almost_equal(samples.mean(), 0, decimal=1)
78+
np.testing.assert_almost_equal(samples.std(), 2, decimal=1)
7979

8080
normal = NormalSampler(2, shape=2)
8181
samples = np.array([normal.rvs() for i in range(100000)])
82-
np.testing.assert_almost_equal(samples.mean(0), [0, 0], decimal=2)
83-
np.testing.assert_almost_equal(samples.std(0), [2, 2], decimal=2)
82+
np.testing.assert_almost_equal(samples.mean(0), [0, 0], decimal=1)
83+
np.testing.assert_almost_equal(samples.std(0), [2, 2], decimal=1)
8484

8585

8686
def test_uniform_sampler():

0 commit comments

Comments
 (0)