Skip to content

Commit 6d97a3a

Browse files
authored
Merge pull request #102 from theabhirath/docfix
Doc fixes for `rand_like` and `randn_like`
2 parents 0267669 + 607aa80 commit 6d97a3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ zeros_like(x::AbstractArray, T::Type, sz=size(x)) = fill!(similar(x, T, sz), 0)
533533
zeros_like(x::AbstractArray, sz=size(x)) = zeros_like(x, eltype(x), sz)
534534

535535
"""
536-
rand_like([rng=GLOBAL_RNG], x, [element_type=eltype(x)], [dims=size(x)])
536+
rand_like([rng=default_rng()], x, [element_type=eltype(x)], [dims=size(x)])
537537
538538
Create an array with the given element type and size, based upon the given source array `x`.
539539
All element of the new array will be set to a random value.
@@ -578,7 +578,7 @@ rand_like(rng::AbstractRNG, x::AbstractArray, T::Type, sz=size(x)) = rand!(rng,
578578
rand_like(rng::AbstractRNG, x::AbstractArray, sz=size(x)) = rand_like(rng, x, eltype(x), sz)
579579

580580
"""
581-
randn_like([rng=GLOBAL_RNG], x, [element_type=eltype(x)], [dims=size(x)])
581+
randn_like([rng=default_rng()], x, [element_type=eltype(x)], [dims=size(x)])
582582
583583
Create an array with the given element type and size, based upon the given source array `x`.
584584
All element of the new array will be set to a random value drawn from a normal distribution.

0 commit comments

Comments
 (0)