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 could really use something like a namedtuple that can do vector operations (immutable, indexable by name and no allocations when doing operations). My idea was to try out ComponentArrays with StaticArrays. But it didn't work
using ComponentArrays
using StaticArrays
comp =ComponentArray((a=5.,b=(c=7.,d=8.)))
scomp =ComponentArray(SVector(getdata(comp)...),getaxes(comp))
getdata(scomp)*2#works
scomp*2# Error
The error is:
ERROR: Dimension is not static. Please file a bug.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] copy
@ C:\Users\x\.julia\packages\StaticArrays\jA1zK\src\broadcast.jl:61 [inlined]
[3] materialize
@ .\broadcast.jl:860 [inlined]
[4] broadcast_preserving_zero_d
@ .\broadcast.jl:849 [inlined]
[5] *(A::ComponentVector{Float64, SVector{3, Float64}, Tuple{Axis{(a = 1, b = ViewAxis(2:3, Axis(c = 1, d = 2)))}}}, B::Int64)
@ Base .\arraymath.jl:24
[6] top-level scope
@ c:\Users\x\Documents\julia3\test.jl:71
I could really use something like a namedtuple that can do vector operations (immutable, indexable by name and no allocations when doing operations). My idea was to try out ComponentArrays with StaticArrays. But it didn't work
The error is:
(Link to the similar issue in ComponentArrays)
The text was updated successfully, but these errors were encountered: