Skip to content

Commit bfb05c8

Browse files
committed
add rng to lines in tests which are missing rng
1 parent 2b129c0 commit bfb05c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/models.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const test_props = [Proposals.Rejection(maxiter=Int(1e6)), Proposals.RWalk(ratio
99
sampler = Nested(D, 50D; bounds=bound, proposal=proposal)
1010

1111
chain, state = sample(rng, model, sampler; dlogz=0.01)
12-
chain_res = sample(chain, Weights(vec(chain[:weights])), length(chain))
12+
chain_res = sample(rng, chain, Weights(vec(chain[:weights])), length(chain))
1313
# test posteriors
1414
vals = Array(chain_res)
1515
means = mean(vals, dims=1)
@@ -64,7 +64,7 @@ const test_props = [Proposals.Rejection(maxiter=Int(1e6)), Proposals.RWalk(ratio
6464

6565
spl = Nested(2, 1000, bounds=bound, proposal=proposal)
6666
chain, state = sample(rng, model, spl; dlogz=0.01)
67-
chain_res = sample(chain, Weights(vec(chain[:weights])), length(chain))
67+
chain_res = sample(rng, chain, Weights(vec(chain[:weights])), length(chain))
6868

6969
diff = state.logz - analytic_logz
7070
atol = 6state.logzerr
@@ -90,7 +90,7 @@ const test_props = [Proposals.Rejection(maxiter=Int(1e6)), Proposals.RWalk(ratio
9090

9191
@test state.logz logz atol = 5state.logzerr
9292

93-
chain_res = sample(chain, Weights(vec(chain[:weights])), length(chain))
93+
chain_res = sample(rng, chain, Weights(vec(chain[:weights])), length(chain))
9494
xmodes = sort!(findpeaks(chain_res[:, 1, 1])[1:5])
9595
@test all(isapprox.(xmodes, 0.1:0.2:0.9, atol=0.2))
9696
ymodes = sort!(findpeaks(chain_res[:, 2, 1])[1:5])

0 commit comments

Comments
 (0)