1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-12-28 18:50:29 +01:00

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

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
###############################################################################