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:
parent
439be34d21
commit
505295aa5a
@ -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
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user