Skip to content

Commit fd7164d

Browse files
author
Chris Fonnesbeck
committed
Added random number seed to test_sampling
1 parent 924810a commit fd7164d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymc3/tests/test_sampling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
except:
2020
test_parallel = False
2121

22+
RSEED = 20090425
2223

2324
def test_sample():
2425

@@ -44,7 +45,7 @@ def test_iter_sample():
4445
def test_parallel_start():
4546
model, _, _, _ = simple_init()
4647
with model:
47-
tr = sample(5, njobs=2, start=[{'x': [10,10]}, {'x': [-10,-10]}])
48+
tr = sample(5, njobs=2, start=[{'x': [10,10]}, {'x': [-10,-10]}], random_seed=RSEED)
4849
assert tr.get_values('x', chains=0)[0][0] > 0
4950
assert tr.get_values('x', chains=1)[0][0] < 0
5051

0 commit comments

Comments
 (0)