@@ -1482,12 +1482,12 @@ randsubseq(A::AbstractArray, p::Real) = randsubseq(GLOBAL_RNG, A, p)
1482
1482
end
1483
1483
1484
1484
"""
1485
- shuffle!([rng=GLOBAL_RNG,] v)
1485
+ shuffle!([rng=GLOBAL_RNG,] v::AbstractArray )
1486
1486
1487
- In-place version of [`shuffle`](@ref): randomly permute the array `v` in-place,
1487
+ In-place version of [`shuffle`](@ref): randomly permute `v` in-place,
1488
1488
optionally supplying the random-number generator `rng`.
1489
1489
"""
1490
- function shuffle! (r:: AbstractRNG , a:: AbstractVector )
1490
+ function shuffle! (r:: AbstractRNG , a:: AbstractArray )
1491
1491
n = length (a)
1492
1492
@assert n <= Int64 (2 )^ 52
1493
1493
mask = nextpow2 (n) - 1
@@ -1499,18 +1499,18 @@ function shuffle!(r::AbstractRNG, a::AbstractVector)
1499
1499
return a
1500
1500
end
1501
1501
1502
- shuffle! (a:: AbstractVector ) = shuffle! (GLOBAL_RNG, a)
1502
+ shuffle! (a:: AbstractArray ) = shuffle! (GLOBAL_RNG, a)
1503
1503
1504
1504
"""
1505
- shuffle([rng=GLOBAL_RNG,] v)
1505
+ shuffle([rng=GLOBAL_RNG,] v::AbstractArray )
1506
1506
1507
1507
Return a randomly permuted copy of `v`. The optional `rng` argument specifies a random
1508
1508
number generator (see [Random Numbers](@ref)).
1509
- To permute `v` in-place, see [`shuffle!`](@ref). To obtain randomly permuted
1509
+ To permute `v` in-place, see [`shuffle!`](@ref). To obtain randomly permuted
1510
1510
indices, see [`randperm`](@ref).
1511
1511
"""
1512
- shuffle (r:: AbstractRNG , a:: AbstractVector ) = shuffle! (r, copymutable (a))
1513
- shuffle (a:: AbstractVector ) = shuffle (GLOBAL_RNG, a)
1512
+ shuffle (r:: AbstractRNG , a:: AbstractArray ) = shuffle! (r, copymutable (a))
1513
+ shuffle (a:: AbstractArray ) = shuffle (GLOBAL_RNG, a)
1514
1514
1515
1515
"""
1516
1516
randperm([rng=GLOBAL_RNG,] n::Integer)
0 commit comments