diff --git a/NEWS.md b/NEWS.md index e4d562659993a..f39e805bdc163 100644 --- a/NEWS.md +++ b/NEWS.md @@ -45,7 +45,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]). diff --git a/stdlib/SparseArrays/src/sparsematrix.jl b/stdlib/SparseArrays/src/sparsematrix.jl index 572b6daa2eeef..c4b335701400d 100644 --- a/stdlib/SparseArrays/src/sparsematrix.jl +++ b/stdlib/SparseArrays/src/sparsematrix.jl @@ -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)