From 45cfd0c9431a642778159be40a95c5511abd3d32 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 00:47:55 +0100 Subject: [PATCH] News and compat annotation for #30090 (sprand with specified type). --- NEWS.md | 2 +- stdlib/SparseArrays/src/sparsematrix.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4c08456ddcccf..f08899bb9e8c1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -46,7 +46,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)