-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
The definition of variables,
| MP.variables(p::AbstractArray{<:PolyType}) = mergevars(MP.variables.(p))[1] |
is supposed to work on (abstract) arrays of any shape. However, by broadcasting the variables, the shape is retained, and
mergevars actually expects a Vector of Vectors:DynamicPolynomials.jl/src/var.jl
Line 283 in f8fe686
| function mergevars(varsvec::Vector{Vector{PV}}) where {PV<:Variable} |
So calling
variables on, say, a matrix, won't work. mergevars should probably also accept AbstractArray{Vector{PV}} (as well as mergevars_to!)? Or variables should work only on Vectors (even AbstractVector would be problematic, I guess, since the output type of broadcasting is created via similar, which need not give a Vector)? Or since it is not in the MP specification, variables shouldn't support any array input at all?Metadata
Metadata
Assignees
Labels
No labels