-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
Static arrays support accessing by index or by property name:
julia> using StaticArrays, StructArrays
julia> v = SVector(1, 2)
julia> v[1]
1
julia> v.x
1
However, a struct array of static arrays can only retrieve components by index:
julia> a = StructArray([v])
1-element StructArray(::Vector{Int64}, ::Vector{Int64}) with eltype SVector{2, Int64}:
[1, 2]
julia> a.:1
1-element Vector{Int64}:
1
julia> a.x
ERROR: type Tuple has no field x
Can both be supported? I understand this isn't straightforward, but would be useful.
Metadata
Metadata
Assignees
Labels
No labels