Open colinxs opened 5 years ago
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.
vec
Int
vec.y
ReshapedArray
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
vec
is 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.y
in the above example would return aReshapedArray
of the underlyingview
.Thoughts?