SciML / SciML/LabelledArrays.jl
Flattening heterogeneous arrays into single vector
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 125
- Forks
- 20
- Avg merge
- 6h 3m
- Merged PRs (30d)
- 10
Description
I'm looking for a way to store tuples of same-typed but differently-sized data as in:
x=1;
y=[2 4; 3 5];
vec = LVector(x=x, y=y);
vec[:] == [1,2,3,4,5] # true
vec.x == 1 # true
vec.y == [2 4; 3 5];
So that under the hood vec is a contiguous array of Int. It seems like this could be done be storing not just the indices in the type, but the underlying shape as well. vec.y in the above example would return a ReshapedArray of the underlying view.
Thoughts?
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
The issue describes a proposed LVector representation for flattening differently sized, same-typed values, but names no files or tests. Start by locating the LVector implementation and existing indexing or reshaping tests. Done means supporting the shown x and y construction, contiguous storage, and equivalent labelled access.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100