Skip to content

Commit 6c58a1d

Browse files
committed
News and compat annotation for #30090 (sprand with specified type).
1 parent e008525 commit 6c58a1d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Standard library changes
3838
* `range` can accept the stop value as a positional argument, e.g. `range(1,10,step=2)` ([#28708]).
3939
* `edit` can now be called on a module to edit the file that defines it ([#29636]).
4040
* `diff` now supports arrays of arbitrary dimensionality and can operate over any dimension ([#29827]).
41-
* `sprandn` now supports result types like `ComplexF64` or `Float32` ([#30083]).
41+
* `sprandn` now supports specifying the output element type ([#30083]).
4242
* All compiler-reflection tools (i.e. the `code_` class of functions and macros) now print accurate
4343
line number and inlining information in a common style, and take an optional parameter (debuginfo=:default)
4444
to control the verbosity of the metadata shown ([#29893]).

stdlib/SparseArrays/src/sparsematrix.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,9 @@ with the specified (independent) probability `p` of any entry being nonzero,
14781478
where nonzero values are sampled from the normal distribution. The optional `rng`
14791479
argument specifies a random number generator, see [Random Numbers](@ref).
14801480
1481+
!!! compat "Julia 1.1"
1482+
Specifying the output element type `Type` requires at least Julia 1.1.
1483+
14811484
# Examples
14821485
```jldoctest; setup = :(using Random; Random.seed!(0))
14831486
julia> sprandn(2, 2, 0.75)

0 commit comments

Comments
 (0)