mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-28 18:50:29 +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
|
||||
|
||||
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")
|
||||
return GroupRingElem(x, RG)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user