Skip to content

Commit ef779e1

Browse files
committed
Revert matrix changes
1 parent e26b4c9 commit ef779e1

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
@@ -441,6 +441,5 @@ Return parent object corresponding to the ring of $n\times n$ matrices over
441441
the ring $R$.
442442
"""
443443
function matrix_ring(R::NCRing, n::Int)
444-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
445-
return Generic.matrix_ring(R, n)
444+
Generic.matrix_ring(R, n)
446445
end

src/Matrix.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6633,7 +6633,6 @@ randmat_with_rank(S::MatSpace{T}, rank::Int, v...) where {T <: RingElement} =
66336633
Constructs the matrix over $R$ with entries as in `arr`.
66346634
"""
66356635
function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T}
6636-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
66376636
if elem_type(R) === T && all(e -> parent(e) === R, arr)
66386637
z = Generic.MatSpaceElem{elem_type(R)}(R, arr)
66396638
return z
@@ -6644,7 +6643,6 @@ function matrix(R::NCRing, arr::AbstractMatrix{T}) where {T}
66446643
end
66456644

66466645
function matrix(R::NCRing, arr::MatElem)
6647-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
66486646
return map_entries(R, arr)
66496647
end
66506648

@@ -6683,7 +6681,6 @@ Constructs the $r \times c$ matrix over $R$, where the entries are taken
66836681
row-wise from `arr`.
66846682
"""
66856683
function matrix(R::NCRing, r::Int, c::Int, arr::AbstractVecOrMat{T}) where T
6686-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
66876684
_check_dim(r, c, arr)
66886685
ndims(arr) == 2 && return matrix(R, arr)
66896686
if elem_type(R) === T && all(e -> parent(e) === R, arr)
@@ -7065,7 +7062,6 @@ the ring $R$.
70657062
function matrix_space(R::NCRing, r::Int, c::Int; cached::Bool = true)
70667063
# TODO: the 'cached' argument is ignored and mainly here for backwards compatibility
70677064
# (and perhaps future compatibility, in case we need it again)
7068-
@req !is_trivial(R) "Zero rings are currently not supported as base ring."
70697065
(r < 0 || c < 0) && error("Dimensions must be non-negative")
70707066
T = elem_type(R)
70717067
return MatSpace{T}(R, r, c)

0 commit comments

Comments
 (0)