SciML / SciML/ComponentArrays.jl
FR: Preserve CA-ness when indexing component matrix with shaped components
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 375
- Forks
- 42
- Avg merge
- 7h 25m
- Merged PRs (30d)
- 17
Description
Would it be possible to make this not fall back to Array so you could more easily work with the result when slicing a subset of blocks?:
julia> c = ComponentVector(x=rand(2,2), y=rand(3), z=4);
julia> m = c * c';
julia> m[:x]
2×2×2×2 Array{Float64, 4}:
[:, :, 1, 1] = ...
Specifically I'm also interested in slicing multiple sub-blocks like m[[:x,:y]], although I'm imagining making the thing above work would be the first step. Thanks.
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
No file or test is named. Reproduce the Julia REPL example with shaped x and y components, then trace the indexing entry points for m[:x] and m[[:x,:y]]. Done means indexing preserves the ComponentArray type for a single shaped component and establishes the intended behavior for multiple sub-blocks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100