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
Indeed! I saw that it converts an IdentityMultiple (defined in this library). So I guess it does that for AbstractMatrix when no custom hcat method is implemented.
julia> A =Id(2)
IdentityMultiple{Float64} of value 1.0 and order 2
julia>hcat(A)
2×2 Matrix{Float64}:1.00.00.01.0
I see, I guess the use of this hcat is to turn vectors to matrices so we can just create a vector_to_matrix function that calls hcat on AbstractVector and does nothing on matrices
Currently
@system
callshcat
on every matrix, which yields aMatrix
even if the input already was anAbstractMatrix
.MathematicalSystems.jl/src/macros.jl
Lines 599 to 611 in c1b8b06
I think this is not good because you may for instance want to work with a sparse matrix.
This change was added in #175 with the motivation to handle scalar inputs.
A simple solution would be to check whether the input has type
AbstractMatrix
and in that case not callhcat
.This would be mildly breaking.
The text was updated successfully, but these errors were encountered: