Skip to content

Flattening heterogeneous arrays into single vector #67

Description

@colinxs

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions