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 e008525 commit 6c58a1d
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 @@ -38,7 +38,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]).
* All compiler-reflection tools (i.e. the `code_` class of functions and macros) now print accurate
line number and inlining information in a common style, and take an optional parameter (debuginfo=:default)
to control the verbosity of the metadata shown ([#29893]).
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 6c58a1d

Please sign in to comment.