diff --git a/Project.toml b/Project.toml index 18323b4fbd..d246b727e5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "AbstractAlgebra" uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" -version = "0.32.2" +version = "0.32.3" [deps] GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120" diff --git a/src/Matrix.jl b/src/Matrix.jl index 46e31d675c..29071ec7b7 100644 --- a/src/Matrix.jl +++ b/src/Matrix.jl @@ -7019,7 +7019,11 @@ function diagonal_matrix(x::T, xs::T...) where {T<:MatElem} end function diagonal_matrix(R::NCRing, V::Vector{<:MatElem}) - return block_diagonal_matrix(map(x -> change_base_ring(R, x), V)) + if length(V) == 0 + return zero_matrix(R, 0, 0) + else + return block_diagonal_matrix(map(x -> change_base_ring(R, x), V)) + end end