SciML / SciML/ComponentArrays.jl
provide type-inferred length
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 375
- Forks
- 42
- Avg merge
- 7h 25m
- Merged PRs (30d)
- 17
Description
A maybe-nice feature request.
Using StaticArrays.jl often helps avoiding allocation in bottle-neck code. When creating the StaticArray, the length or size must be known to the compiler.
ComponentArrays have this information in its type in its axes. However, currently length and size are based on the underlying array, for which the size might not be known at compile time.
I suggest implementing Base.length for an Axis and use this to implement Base.length and Base.size on getaxes(cv).
Contributor guide
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
Start by locating the Axis type and getaxes(cv), then inspect how Base.length and Base.size currently derive values from the underlying array. Done means Axis exposes its length and getaxes(cv) provides type-inferred length and size based on the axes information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100