julia> using DynamicPolynomials
julia> @ncpolyvar x y
(x, y)
julia> x^0*y
ERROR: BoundsError: attempt to access 1-element Array{PolyVar{false},1} at index [0]
Stacktrace:
[1] getindex at ./array.jl:809 [inlined]
[2] multiplyvar at /home/hmh/.julia/packages/DynamicPolynomials/JAy5x/src/ncmult.jl:33 [inlined]
[3] *(::Monomial{false}, ::PolyVar{false}) at /home/hmh/.julia/packages/DynamicPolynomials/JAy5x/src/ncmult.jl:93
[4] top-level scope at REPL[3]:1
[5] run_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.2/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288
It appears this problem arises because x^0 is not the same things as one(Monomial{false}).
It appears this problem arises because x^0 is not the same things as
one(Monomial{false})
.