Open
Description
The output type of vcat
depends on whether the same key is present in multiple vectors and on the number of concatenated vectors.
using ComponentArrays
ca1 = ComponentVector(a=1, b=2, c=3)
ca2 = ComponentVector(d=4)
ca3 = ComponentVector(e=4)
ca = vcat(ca1, ca2) # gives ComponentVector, @report_opt vcat(ca1, ca2) from Jet.jl detects runtime dispatch
ca = vcat(ca1, ca2, ca3) # gives Vector, no runtime dispatch
ca1 = ComponentVector(a=1, b=2, c=3)
ca2 = ComponentVector(c=5, d=4)
ca = vcat(ca1, ca2) # gives Vector, no runtime dispatch
- ComponentArrays v"0.15.17"
- Julia v"1.10.5"
Metadata
Assignees
Labels
No labels
Activity