JuliaArrays / JuliaArrays/StaticArrays.jl
Constructing StaticArrays with generators or ntuple-like syntax
Open
Nobody has claimed this yet.
design
feature
up for grabs
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
The following presumably creates a temporary:
julia> SVector(ntuple(i->i^2, 3))
3-element StaticArrays.SVector{3,Int64}:
1
4
9
It would be great to be able to do
julia> SVector(i->i^2, 3)
3-element StaticArrays.SVector{3,Int64}:
1
4
9
without creating the tuple temporary.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by locating the SVector constructor entry points and existing constructor tests, then compare the current ntuple form with the requested generator-like form. Done means SVector(i->i^2, 3) produces the shown values without requiring the caller to create a tuple temporary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100