Skip to content

Commit

Permalink
randsubseq docstring: remove useless collect (#35344)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet authored and staticfloat committed Apr 21, 2020
1 parent e7ab124 commit bf38141
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions stdlib/Random/src/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ julia> rng = MersenneTwister(1234);
julia> S = Int64[];
julia> randsubseq!(rng, S, collect(1:8), 0.3);
julia> randsubseq!(rng, S, 1:8, 0.3)
2-element Array{Int64,1}:
7
8
julia> S
2-element Array{Int64,1}:
Expand All @@ -157,7 +160,7 @@ large.) Technically, this process is known as "Bernoulli sampling" of `A`.
```jldoctest
julia> rng = MersenneTwister(1234);
julia> randsubseq(rng, collect(1:8), 0.3)
julia> randsubseq(rng, 1:8, 0.3)
2-element Array{Int64,1}:
7
8
Expand Down

0 comments on commit bf38141

Please sign in to comment.