Skip to content

Commit

Permalink
Clarify the behavior of rand/randn for complex types (#33002)
Browse files Browse the repository at this point in the history
(cherry picked from commit fa641c6)
  • Loading branch information
antoine-levitt authored and KristofferC committed Aug 25, 2019
1 parent f482cb4 commit 222fa90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stdlib/Random/src/Random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ Pick a random element or array of random elements from the set of values specifi
* an `AbstractDict` or `AbstractSet` object,
* a string (considered as a collection of characters), or
* a type: the set of values to pick from is then equivalent to `typemin(S):typemax(S)` for
integers (this is not applicable to [`BigInt`](@ref)), and to ``[0, 1)`` for floating
point numbers;
integers (this is not applicable to [`BigInt`](@ref)), to ``[0, 1)`` for floating
point numbers and to ``[0, 1)+i[0, 1)]`` for complex floating point numbers;
`S` defaults to [`Float64`](@ref).
Expand Down
2 changes: 1 addition & 1 deletion stdlib/Random/src/normal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Optionally generate an array of normally-distributed random numbers.
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.
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`).
# Examples
```jldoctest
Expand Down

0 comments on commit 222fa90

Please sign in to comment.