Skip to content

Commit ae82171

Browse files
authored
Use Random.default_rng() instead of Random.GLOBAL_RNG (#80)
* Use `Random.default_rng()` instead of `Random.GLOBAL_RNG` * Adjust tolerance of test * Update Project.toml
1 parent 658191d commit ae82171

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AdvancedMH"
22
uuid = "5b7e9947-ddc0-4b3f-9b55-0d8042f74170"
3-
version = "0.7.3"
3+
version = "0.7.4"
44

55
[deps]
66
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"

src/proposal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function RandomWalkProposal{issymmetric}(proposal) where {issymmetric}
2121
end
2222

2323
# Random draws
24-
Base.rand(p::Proposal, args...) = rand(Random.GLOBAL_RNG, p, args...)
24+
Base.rand(p::Proposal, args...) = rand(Random.default_rng(), p, args...)
2525
Base.rand(rng::Random.AbstractRNG, p::Proposal{<:Distribution}) = rand(rng, p.proposal)
2626
function Base.rand(rng::Random.AbstractRNG, p::Proposal{<:AbstractArray})
2727
return map(x -> rand(rng, x), p.proposal)

0 commit comments

Comments
 (0)