Skip to content

Commit

Permalink
preserve Generic.MatSpaceElem
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Nov 8, 2024
1 parent 1460de1 commit abe822f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/generic/Matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ Base.isassigned(a::Union{Mat,MatRingElem}, i, j) = isassigned(a.entries, i, j)
#
################################################################################

function similar(x::MatSpaceElem{T}, r::Int, c::Int) where T <: NCRingElement
M = Matrix{T}(undef, (r, c))
return MatSpaceElem{T}(R, M)
end

function copy(d::MatSpaceElem{T}) where T <: NCRingElement
z = similar(d)
for i = 1:nrows(d)
Expand Down

0 comments on commit abe822f

Please sign in to comment.