I have a pair of tensors S
and T
of dimensions (s1,...,sm)
and (t1,...,tn)
with si < ti
. I want to specify a list of indices in each dimensions of T
to "embed" S
in T
. If I1
is a list of s1
indices in (0,1,...,t1)
and likewise for I2
up to In
, I would like to do something like
T.select(I1,...,In)=S
that will have the effect that now T
has entries equal to the entries of S
over the indices (I1,...,In)
.
for example
`S=
[[1,1],
[1,1]]
T=
[[0,0,0],
[0,0,0],
[0,0,0]]
T.select([0,2],[0,2])=S
T=
[[1,0,1],
[0,0,0],
[1,0,1]]`