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
So I tried using StaticArrays inside a ComponentArray. It constructed, but then I got problems with broadcasting.
Everything works with a regular vector
julia>ax = Axis(a=1,b=2,c=3)
Axis(a = 1, b = 2, c = 3)
julia> ca = ComponentVector(randn(3), ax)
ComponentVector{Float64}(a = -0.026510360005660757, b = 1.6198025264096019, c = 0.5024437339679514)
julia> ca.*0
ComponentVector{Float64}(a = -0.0, b = 0.0, c = 0.0)
Static Vector constructs but produces an error saying that the dimension is not static.
julia> cas = ComponentVector(SVector{3}(collect(ca)), ax)
ComponentVector{Float64, SVector{3, Float64}, Tuple{Axis{(a = 1, b = 2, c = 3)}}}(a = -0.026510360005660757, b = 1.6198025264096019, c = 0.5024437339679514)
julia> cas.*0
ERROR: Dimension is not static. Please file a bug.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] copy
@ C:\Users\me\.julia\packages\StaticArrays\MSJcA\src\broadcast.jl:59 [inlined]
[3] materialize(bc::Base.Broadcast.Broadcasted{StaticArraysCore.StaticArrayStyle{…}, Nothing, typeof(*), Tuple{…}})
@ Base.Broadcast .\broadcast.jl:867
[4] top-level scope
@ REPL[5]:1
Some type information was truncated. Use `show(err)` to see complete types.
I'm guessing that ComponentVector implicitly assumes a regular vector somewhere so when instantiating, the length is unintentionally dropped?
The text was updated successfully, but these errors were encountered:
So I tried using StaticArrays inside a ComponentArray. It constructed, but then I got problems with broadcasting.
Everything works with a regular vector
Static Vector constructs but produces an error saying that the dimension is not static.
I'm guessing that ComponentVector implicitly assumes a regular vector somewhere so when instantiating, the length is unintentionally dropped?
The text was updated successfully, but these errors were encountered: