Skip to content

Commit 37b8a64

Browse files
lgoettgensthofma
authored andcommitted
Revert matrix changes
1 parent f84179f commit 37b8a64

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/MatRing.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,5 @@ Return parent object corresponding to the ring of $n\times n$ matrices over
446446
the ring $R$.
447447
"""
448448
function matrix_ring(R::NCRing, n::Int)
449-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
450-
return Generic.matrix_ring(R, n)
449+
Generic.matrix_ring(R, n)
451450
end

src/Matrix.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6653,7 +6653,6 @@ julia> using LinearAlgebra ; matrix(GF(5), I(2))
66536653
"""
66546654
function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T}
66556655
Base.require_one_based_indexing(arr)
6656-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
66576656
if elem_type(R) === T && all(e -> parent(e) === R, arr)
66586657
z = Generic.MatSpaceElem{elem_type(R)}(R, arr)
66596658
return z
@@ -6665,7 +6664,6 @@ function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T}
66656664
end
66666665

66676666
function matrix(R::NCRing, arr::MatElem)
6668-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
66696667
return map_entries(R, arr)
66706668
end
66716669

@@ -6704,7 +6702,6 @@ Constructs the $r \times c$ matrix over $R$, where the entries are taken
67046702
row-wise from `arr`.
67056703
"""
67066704
function matrix(R::NCRing, r::Int, c::Int, arr::AbstractVecOrMat{T}) where T
6707-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
67086705
_check_dim(r, c, arr)
67096706
ndims(arr) == 2 && return matrix(R, arr)
67106707
if elem_type(R) === T && all(e -> parent(e) === R, arr)
@@ -7089,7 +7086,6 @@ the ring $R$.
70897086
function matrix_space(R::NCRing, r::Int, c::Int; cached::Bool = true)
70907087
# TODO: the 'cached' argument is ignored and mainly here for backwards compatibility
70917088
# (and perhaps future compatibility, in case we need it again)
7092-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
70937089
(r < 0 || c < 0) && error("Dimensions must be non-negative")
70947090
T = elem_type(R)
70957091
return MatSpace{T}(R, r, c)

0 commit comments

Comments
 (0)