mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
throw message on (::GroupRing)(::Vector) when no basis is defined
This commit is contained in:
parent
49bb2ba4a0
commit
558cbc78d8
@ -163,6 +163,7 @@ end
|
|||||||
# keep storage type
|
# keep storage type
|
||||||
|
|
||||||
function (RG::GroupRing)(x::AbstractVector{T}) where T<:Number
|
function (RG::GroupRing)(x::AbstractVector{T}) where T<:Number
|
||||||
|
isdefined(RG, :basis) || throw("Basis of GroupRing not defined. For advanced use the direct constructor of GroupRingElem is provided.")
|
||||||
length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ")
|
length(x) == length(RG.basis) || throw("Can not coerce to $RG: lengths differ")
|
||||||
return GroupRingElem(x, RG)
|
return GroupRingElem(x, RG)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user