Skip to content

Commit 1df1e42

Browse files
antoine-levittSacha0
authored andcommitted
Document Diagonal from diagm (#22367)
* Reference Diagonal in diagm documentation
1 parent d49469d commit 1df1e42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/linalg/dense.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ diag(A::AbstractMatrix, k::Integer=0) = A[diagind(A,k)]
246246
"""
247247
diagm(v, k::Integer=0)
248248
249-
Construct a matrix by placing `v` on the `k`th diagonal.
249+
Construct a matrix by placing `v` on the `k`th diagonal. This constructs a full matrix; if
250+
you want a storage-efficient version with fast arithmetic, use [`Diagonal`](@ref) instead.
250251
251252
# Example
252253

0 commit comments

Comments
 (0)