From e3b1498efa63f41bb00f80a828a682f7c31c1c93 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Sat, 17 Oct 2020 16:48:36 +0200 Subject: [PATCH] fix: deepcopy for baseless rings --- src/GroupRings.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index 69ebc30..fcca427 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -203,13 +203,13 @@ Base.IndexStyle(::Type{GroupRingElem}) = Base.LinearFast() dense(X::GroupRingElem{T, A}) where {T, A<:DenseVector} = X function dense(X::GroupRingElem{T, Sp}) where {T, Sp<:SparseVector} - return parent(X)(Vector(X.coeffs)) + return GroupRingElem(Vector(X.coeffs), parent(X)) end SparseArrays.sparse(X::GroupRingElem{T, Sp}) where {T, Sp<:SparseVector} = X function SparseArrays.sparse(X::GroupRingElem{T, A}) where {T, A<:Vector} - return parent(X)(sparse(X.coeffs)) + return GroupRingElem(sparse(X.coeffs), parent(X)) end ############################################################################### @@ -280,7 +280,7 @@ end hasbasis(A::GroupRing) = isdefined(A, :basis) Base.deepcopy_internal(x::GroupRingElem, dict::IdDict) = - parent(x)(deepcopy(x.coeffs)) + GroupRingElem(deepcopy(x.coeffs), parent(x)) ############################################################################### #