JuliaArrays / JuliaArrays/StaticArrays.jl

`FieldArray` could display better

Open
#1,223 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
844
Forks
159
Avg merge
3d 21h
Merged PRs (30d)
3

Description

A FieldArray displays as an array, values only. It would be great if it showed the field names too---named fields are presumably the reason to use a FieldArray in the first place.

julia> using StaticArrays

julia> Base.@kwdef struct Foo <: FieldVector{2,Float64}
           bar::Float64
           baz::Float64
       end
Foo

julia> Foo(bar=3.0, baz=5.0)
2-element Foo with indices SOneTo(2):
 3.0
 5.0

Compare LabelledArrays.jl:

julia> using LabelledArrays

julia> SLVector(bar=3.0, baz=5.0)
2-element SLArray{Tuple{2}, Float64, 1, 2, (:bar, :baz)} with indices SOneTo(2):
 :bar => 3.0
 :baz => 5.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the FieldArray display implementation and inspect how field names are represented. Compare its output with the LabelledArrays example; done means named fields such as bar and baz appear alongside their values, with coverage for the revised display behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.