ut3_stack#
- t3toolbox.backend.ut3_operations.ut3_stack(xx)#
def ut3_stack( xx, # nested tuple (shaped like stack_shape) of unstacked uniform-T3 .data leaves ) -> typ.Tuple[ NDArray, # tucker_supercore NDArray, # tt_supercore typ.Tuple[int, ...], # shape typ.Tuple[NDArray, NDArray], # (tucker_edge_mask, tt_edge_mask) ]:
Stack an array-like tree of uniform Tucker tensor trains into one.
Inverse of
ut3_unstack(): stacks the supercores and rank masks onto axes1 .. num_levels(after the mode index), keeping the sharedshapeunstacked. Only the four ndarray components go throughstacking.stack;shape(aSequencethe walker would recurse into) is read once from the first leaf and re-attached.