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