You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We could change MA to add something in the interface that allows you to do that.
For a matrix-vector product with an empty matrix and an empty vector, it won't work because we cannot get an element but we actually do not need to create any element since the result is an empty vector so this is fine.
But then how do we do the sum of an empty vector of algebra elements ?
The text was updated successfully, but these errors were encountered:
MutableArithmetics assumes that
zero
is defined for the type of algebra elements at a few places:https://github.com/jump-dev/MutableArithmetics.jl/blob/10bf3f3a9e86061309aaab10bf6e5e7237ca04c7/src/reduce.jl#L25
https://github.com/jump-dev/MutableArithmetics.jl/blob/10bf3f3a9e86061309aaab10bf6e5e7237ca04c7/src/reduce.jl#L58
https://github.com/jump-dev/MutableArithmetics.jl/blob/10bf3f3a9e86061309aaab10bf6e5e7237ca04c7/src/implementations/LinearAlgebra.jl#L382
zero(::Type{<:AlgebraElement})
is however not defined and IIUC, it cannot be defined because it needs anobject
to create the algebra and it's not in the type.Actually, with
DynamicPolynomials
, I also have the issue thatzero
loses the vector of variables so maybe a solution could be found for both packages.We could change MA to add something in the interface that allows you to do that.
For a matrix-vector product with an empty matrix and an empty vector, it won't work because we cannot get an element but we actually do not need to create any element since the result is an empty vector so this is fine.
But then how do we do the sum of an empty vector of algebra elements ?
The text was updated successfully, but these errors were encountered: