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?
I'm looking for a way to store tuples of same-typed but differently-sized data as in:
So that under the hood
vecis a contiguous array ofInt. It seems like this could be done be storing not just the indices in the type, but the underlying shape as well.vec.yin the above example would return aReshapedArrayof the underlyingview.Thoughts?