Skip to content

Commit ba9900f

Browse files
committed
Disallow evaluating at empty vectors
1 parent bae3ab3 commit ba9900f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generic/UnivPoly.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,10 +788,10 @@ end
788788
###############################################################################
789789

790790
function evaluate(a::UnivPoly, A::Vector{<:Union{NCRingElem, RingElement}})
791+
isempty(A) && error("Too few values")
791792
a2 = data(a)
792793
varidx = Int[var_index(x) for x in vars(a2)]
793794
isempty(varidx) && return constant_coefficient(a2)
794-
isempty(A) && error("Number of variables does not match number of values")
795795
vals = zeros(parent(A[1]), nvars(parent(a2)))
796796
n = length(A)
797797
for i in varidx

0 commit comments

Comments
 (0)