We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a86c8d0 commit e132021Copy full SHA for e132021
1 file changed
src/resettablerng.jl
@@ -47,6 +47,7 @@ Base.randn(r::ResettableRNG, ::Type{T}) where {T} = randn(r.rng, T)
47
Base.randn(r::ResettableRNG, ::Type{Float64}) where {T} = randn(r.rng, Float64)
48
49
function Base.iterate(r::ResettableRNG)
50
+ r = deepcopy(r)
51
reset!(r)
52
return (rand(r), nothing)
53
end
0 commit comments