SciML / SciML/LabelledArrays.jl

Flattening heterogeneous arrays into single vector

Open
#67 0 comments 3 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.