JuliaAlgebra / DynamicPolynomials.jl

Multivariate polynomials implementation of commutative and non-commutative variables
Other
59 stars 21 forks source link

ArgumentError: There should be as many variables as exponents #141

Closed kbarros closed 1 year ago

kbarros commented 1 year ago

Failure on the last line below seems surprising.

using DynamicPolynomials
@polyvar x y z

subs(x^2, x => z^2) # z⁴
subs(x^2 + y^2, x => z) # z² + y²
subs(x^2 + y^2, x => 1z^2) # y² + z⁴
subs(x^2 + y^2, x => z^2) # ArgumentError: There should be as many variables as exponents
blegat commented 1 year ago

Thanks for reporting this, it should be fixed in https://github.com/JuliaAlgebra/DynamicPolynomials.jl/pull/142