From de58eddf465ba02f37a37651f76d9eda25199b11 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sat, 13 May 2023 15:34:20 -0700 Subject: [PATCH 1/6] add randn! to randn's docstring --- stdlib/Random/src/normal.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/Random/src/normal.jl b/stdlib/Random/src/normal.jl index 9d0f1595f052f..fa7356bef0c01 100644 --- a/stdlib/Random/src/normal.jl +++ b/stdlib/Random/src/normal.jl @@ -19,6 +19,7 @@ The `Base` module currently provides an implementation for the types [`Float16`](@ref), [`Float32`](@ref), and [`Float64`](@ref) (the default), and their [`Complex`](@ref) counterparts. When the type argument is complex, the values are drawn from the circularly symmetric complex normal distribution of variance 1 (corresponding to real and imaginary part having independent normal distribution with mean zero and variance `1/2`). +Also see the `randn!` function. # Examples ```jldoctest From d17456c75e67696081bbb1aefd05ade4477ec806 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sat, 13 May 2023 15:36:36 -0700 Subject: [PATCH 2/6] add rand! to rand's docstring --- stdlib/Random/src/Random.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 8da2dd6f3e9c7..42f28324ba6fc 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -325,6 +325,7 @@ Pick a random element or array of random elements from the set of values specifi When only one argument is passed besides the optional `rng` and is a `Tuple`, it is interpreted as a collection of values (`S`) and not as `dims`. +Also see the `rand!` function. !!! compat "Julia 1.1" Support for `S` as a tuple requires at least Julia 1.1. From ff5a61b9fbb04c81ad861970dc91d4753874a4a0 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sun, 14 May 2023 01:16:48 -0700 Subject: [PATCH 3/6] add @ref Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com> --- stdlib/Random/src/Random.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 42f28324ba6fc..574412c8b8848 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -325,7 +325,8 @@ Pick a random element or array of random elements from the set of values specifi When only one argument is passed besides the optional `rng` and is a `Tuple`, it is interpreted as a collection of values (`S`) and not as `dims`. -Also see the `rand!` function. + +See also [`rand!`](@ref) to act in-place, and [`randn`](@ref) for normally distributed numbers. !!! compat "Julia 1.1" Support for `S` as a tuple requires at least Julia 1.1. From ffba3d3dcb7c45186cdf2abd721228a95dbea157 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sun, 14 May 2023 01:19:07 -0700 Subject: [PATCH 4/6] add @ref to docstring --- stdlib/Random/src/normal.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stdlib/Random/src/normal.jl b/stdlib/Random/src/normal.jl index fa7356bef0c01..c2738653a0438 100644 --- a/stdlib/Random/src/normal.jl +++ b/stdlib/Random/src/normal.jl @@ -19,7 +19,8 @@ The `Base` module currently provides an implementation for the types [`Float16`](@ref), [`Float32`](@ref), and [`Float64`](@ref) (the default), and their [`Complex`](@ref) counterparts. When the type argument is complex, the values are drawn from the circularly symmetric complex normal distribution of variance 1 (corresponding to real and imaginary part having independent normal distribution with mean zero and variance `1/2`). -Also see the `randn!` function. + +See also [`randn!`](@ref) to act in-place. # Examples ```jldoctest From 5c696ea1f8d1dc2a965c16b699eaf4572f24479a Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sun, 14 May 2023 01:19:56 -0700 Subject: [PATCH 5/6] fix typo --- stdlib/Random/src/Random.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 574412c8b8848..3c813f6f69b00 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -326,7 +326,7 @@ When only one argument is passed besides the optional `rng` and is a `Tuple`, it as a collection of values (`S`) and not as `dims`. -See also [`rand!`](@ref) to act in-place, and [`randn`](@ref) for normally distributed numbers. +See also [`rand!`](@ref) to act in-place, and [`randn!`](@ref) for normally distributed numbers. !!! compat "Julia 1.1" Support for `S` as a tuple requires at least Julia 1.1. From 51ed17e91fd943429adfa7ed3e0fab9a378dfb40 Mon Sep 17 00:00:00 2001 From: Vasily Ilin Date: Sun, 14 May 2023 21:06:11 -0700 Subject: [PATCH 6/6] also add `randn` to the docstring Co-authored-by: SundaraRaman R --- stdlib/Random/src/Random.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdlib/Random/src/Random.jl b/stdlib/Random/src/Random.jl index 3c813f6f69b00..30bed9433de5a 100644 --- a/stdlib/Random/src/Random.jl +++ b/stdlib/Random/src/Random.jl @@ -326,7 +326,7 @@ When only one argument is passed besides the optional `rng` and is a `Tuple`, it as a collection of values (`S`) and not as `dims`. -See also [`rand!`](@ref) to act in-place, and [`randn!`](@ref) for normally distributed numbers. +See also [`randn`](@ref) for normally distributed numbers, and [`rand!`](@ref) and [`randn!`](@ref) for the in-place equivalents. !!! compat "Julia 1.1" Support for `S` as a tuple requires at least Julia 1.1.