Skip to content

Commit

Permalink
News and compat annotation for #30090 (sprand with specified type).
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Nov 30, 2018
1 parent de68f7c commit 8869fd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Standard library changes
* `range` can accept the stop value as a positional argument, e.g. `range(1,10,step=2)` ([#28708]).
* `edit` can now be called on a module to edit the file that defines it ([#29636]).
* `diff` now supports arrays of arbitrary dimensionality and can operate over any dimension ([#29827]).
* `sprandn` now supports result types like `ComplexF64` or `Float32` ([#30083]).
* `sprandn` now supports specifying the output element type ([#30083]).
* The constructor `BigFloat(::BigFloat)` now respects the global precision setting and always
returns a `BigFloat` with precision equal to `precision(BigFloat)` ([#29127]). The optional
`precision` argument to override the global setting is now a keyword instead of positional
Expand Down
3 changes: 3 additions & 0 deletions stdlib/SparseArrays/src/sparsematrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,9 @@ with the specified (independent) probability `p` of any entry being nonzero,
where nonzero values are sampled from the normal distribution. The optional `rng`
argument specifies a random number generator, see [Random Numbers](@ref).
!!! compat "Julia 1.1"
Specifying the output element type `Type` requires at least Julia 1.1.
# Examples
```jldoctest; setup = :(using Random; Random.seed!(0))
julia> sprandn(2, 2, 0.75)
Expand Down

0 comments on commit 8869fd9

Please sign in to comment.