Closed lkapelevich closed 5 years ago
here is a similar error from a different package (now fixed): https://github.com/JuliaMath/Interpolations.jl/issues/322
Seems to have began with https://github.com/JuliaLang/julia/commit/516067b452db3bb52926c0e0660abf8c6658374e
The problem is with const VarVec{C} = Union{AbstractVector{PolyVar{C}}, NTuple{<:Integer, PolyVar{C}}}
but it looks like the only place where VarVec
is used is MP.emptymonovec(vars::VarVec{C})
. Are both types in the union necessary?
We could create two methods, one for each, instead of one for the union if that helps
OK does emptymonovec
need to be defined for the NTuple type at all? The method wouldn't get hit in tests and I guess I don't really understand when it would be used
Vector of variables can either be a Vector
of AbstractVariable
or a Tuple
of AbstractVariable
.
For DynamicPolynomials, Vector
is used and for TypedPolynomials, Tuple
is used as different variables have different types.
A user wanting to have his code work for both TypedPolynomials and DynamicPolynomials may use tuple of variables even with DynamicPolynomials and then use emptymonovec
.
We should add a test like
@polyvar x
@polyvar y
emptymonovec((x, y))
in MultivariatePolynomials if it is never called in tests
Solved by https://github.com/JuliaAlgebra/DynamicPolynomials.jl/pull/44. Should work on v0.2.1 once it is released
I had been released
I get the following error on Julia master
version info: