Skip to content

Commit

Permalink
Minor fixes to Random.seed! docstring (#45382)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjradcliffe authored and pchintalapudi committed May 25, 2022
1 parent c322595 commit 672602a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions stdlib/Random/src/Random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,33 +402,33 @@ shared task-local generator.
julia> Random.seed!(1234);
julia> x1 = rand(2)
2-element Array{Float64,1}:
0.590845
0.766797
2-element Vector{Float64}:
0.32597672886359486
0.5490511363155669
julia> Random.seed!(1234);
julia> x2 = rand(2)
2-element Array{Float64,1}:
0.590845
0.766797
2-element Vector{Float64}:
0.32597672886359486
0.5490511363155669
julia> x1 == x2
true
julia> rng = MersenneTwister(1234); rand(rng, 2) == x1
julia> rng = Xoshiro(1234); rand(rng, 2) == x1
true
julia> MersenneTwister(1) == Random.seed!(rng, 1)
julia> Xoshiro(1) == Random.seed!(rng, 1)
true
julia> rand(Random.seed!(rng), Bool) # not reproducible
true
julia> rand(Random.seed!(rng), Bool)
julia> rand(Random.seed!(rng), Bool) # not reproducible either
false
julia> rand(MersenneTwister(), Bool) # not reproducible either
julia> rand(Xoshiro(), Bool) # not reproducible either
true
```
"""
Expand Down

0 comments on commit 672602a

Please sign in to comment.