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
I noticed that when doing hcat, I get varying output type based on the number of arguments. That is hcat(v, v) (where v is a ComponentVector) gives a ComponentMatrix, while hcat(v, v, v) gives a Matrix.
I think adding a method like below could resolve this:
function Base.hcat(vectors::ComponentVector{T,A,Tuple{Ax}}...) where {T,A,Ax}
returnComponentMatrix(hcat((getdata(v) for v in vectors)...), Ax(), FlatAxis())
end
happy to open a PR if you think that would work.
Minimal Example:
using ComponentArrays
c =ComponentVector(a=1)
display(hcat(c, c))
display(hcat(c, c, c))
The text was updated successfully, but these errors were encountered:
Hi, thanks for the very useful package!
I noticed that when doing
hcat
, I get varying output type based on the number of arguments. That ishcat(v, v)
(wherev
is aComponentVector
) gives aComponentMatrix
, whilehcat(v, v, v)
gives aMatrix
.I think adding a method like below could resolve this:
happy to open a PR if you think that would work.
Minimal Example:
The text was updated successfully, but these errors were encountered: