mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +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} =
|
promote_rule(::Type{GroupRingElem{T}}, ::Type{GroupRingElem{S}}) where {T,S} =
|
||||||
GroupRingElem{promote_type(T,S)}
|
GroupRingElem{promote_type(T,S)}
|
||||||
|
|
||||||
function convert(::Type{T}, X::GroupRingElem) where {T}
|
function convert(::Type{T}, X::GroupRingElem) where {T<:Number}
|
||||||
return GroupRingElem(convert(AbstractVector{T}, X.coeffs), parent(X))
|
return GroupRingElem(T.(X.coeffs), parent(X))
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user