convert directly the elements of X.coeffs

This commit is contained in:
kalmarek 2017-09-14 17:32:31 +02:00
parent 439be34d21
commit 505295aa5a
1 changed files with 2 additions and 2 deletions

View File

@ -86,8 +86,8 @@ import Base.promote_rule
promote_rule(::Type{GroupRingElem{T}}, ::Type{GroupRingElem{S}}) where {T,S} =
GroupRingElem{promote_type(T,S)}
function convert(::Type{T}, X::GroupRingElem) where {T}
return GroupRingElem(convert(AbstractVector{T}, X.coeffs), parent(X))
function convert(::Type{T}, X::GroupRingElem) where {T<:Number}
return GroupRingElem(T.(X.coeffs), parent(X))
end
###############################################################################