SciML / SciML/ComponentArrays.jl

FR: Preserve CA-ness when indexing component matrix with shaped components

Open
#257 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.