Skip to content

Commit f97df7c

Browse files
mattiadgricardoV94
andauthored
Update pymc/tests/distributions/test_truncated.py
Pass a random seed to draw() for deterministic result instead of a np.random.RandomState Co-authored-by: Ricardo Vieira <[email protected]>
1 parent b05d99c commit f97df7c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pymc/tests/distributions/test_truncated.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,7 @@ def test_truncation_discrete_random(op_type, lower, upper):
184184
# Rejections sampling with probability = (1 - p ** max_n_steps) ** sample_size =
185185
# = (1 - 0.2 ** 3) ** 500 = 0.018
186186
# Still, this probability can be too high to make this test pass with any seed.
187-
random_seed = 2297228
188-
draw(xt, random_seed=np.random.RandomState(random_seed))
187+
draw(xt, random_seed=2297228)
189188

190189

191190
@pytest.mark.parametrize("lower, upper", [(2, np.inf), (2, 5), (-np.inf, 5)])

0 commit comments

Comments
 (0)