From ef779e1cf9aa60693b76b146f42617df328dc010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 11 Oct 2024 10:51:45 +0200 Subject: [PATCH] Revert matrix changes --- src/MatRing.jl | 3 +-- src/Matrix.jl | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/MatRing.jl b/src/MatRing.jl index f1c9b7ad6..7791420a0 100644 --- a/src/MatRing.jl +++ b/src/MatRing.jl @@ -441,6 +441,5 @@ Return parent object corresponding to the ring of $n\times n$ matrices over the ring $R$. """ function matrix_ring(R::NCRing, n::Int) - @req !is_trivial(R) "Zero rings are currently not supported as base ring." - return Generic.matrix_ring(R, n) + Generic.matrix_ring(R, n) end diff --git a/src/Matrix.jl b/src/Matrix.jl index 8de12dca3..c60217cfe 100644 --- a/src/Matrix.jl +++ b/src/Matrix.jl @@ -6633,7 +6633,6 @@ randmat_with_rank(S::MatSpace{T}, rank::Int, v...) where {T <: RingElement} = Constructs the matrix over $R$ with entries as in `arr`. """ function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T} - @req !is_trivial(R) "Zero rings are currently not supported as base ring." if elem_type(R) === T && all(e -> parent(e) === R, arr) z = Generic.MatSpaceElem{elem_type(R)}(R, arr) return z @@ -6644,7 +6643,6 @@ function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T} end function matrix(R::NCRing, arr::MatElem) - @req !is_trivial(R) "Zero rings are currently not supported as base ring." return map_entries(R, arr) end @@ -6683,7 +6681,6 @@ Constructs the $r \times c$ matrix over $R$, where the entries are taken row-wise from `arr`. """ function matrix(R::NCRing, r::Int, c::Int, arr::AbstractVecOrMat{T}) where T - @req !is_trivial(R) "Zero rings are currently not supported as base ring." _check_dim(r, c, arr) ndims(arr) == 2 && return matrix(R, arr) if elem_type(R) === T && all(e -> parent(e) === R, arr) @@ -7065,7 +7062,6 @@ the ring $R$. function matrix_space(R::NCRing, r::Int, c::Int; cached::Bool = true) # TODO: the 'cached' argument is ignored and mainly here for backwards compatibility # (and perhaps future compatibility, in case we need it again) - @req !is_trivial(R) "Zero rings are currently not supported as base ring." (r < 0 || c < 0) && error("Dimensions must be non-negative") T = elem_type(R) return MatSpace{T}(R, r, c)