diff --git a/stdlib/LinearAlgebra/src/dense.jl b/stdlib/LinearAlgebra/src/dense.jl index 0688d6d39e128..1b3603c6a3ff8 100644 --- a/stdlib/LinearAlgebra/src/dense.jl +++ b/stdlib/LinearAlgebra/src/dense.jl @@ -291,6 +291,7 @@ function diagm_container(kv::Pair{<:Integer,<:BitVector}...) return falses(n, n) end +diagm(v::AbstractVector) = diagm(0 => v) function tr(A::Matrix{T}) where T n = checksquare(A)