ut3_to_t3 ========= .. py:function:: t3toolbox.backend.ut3_conversions.ut3_to_t3(x) .. code-block:: python def ut3_to_t3( x: typ.Tuple[ NDArray, # tucker_supercore NDArray, # tt_supercore typ.Tuple[int, ...], # shape, static int tuple typ.Tuple[NDArray, NDArray], # (tucker_edge_mask, tt_edge_mask) ], ) -> typ.Union[ typ.Tuple[typ.Tuple[NDArray, ...], typ.Tuple[NDArray, ...]], # (tucker_cores, tt_cores), if unstacked typ.Tuple, # else a nested tree (shape stack_shape) of those ]: Convert uniform supercores + masks back to ragged TuckerTensorTrain core pairs. Unstacked: returns one ``(tucker_cores, tt_cores)``. Stacked: returns a nested tuple (shaped like ``stack_shape``) of such pairs -- a *tree*, since a varying-rank stack has no single stacked ``TuckerTensorTrain`` (``docs/uniform_ranks_and_varieties.md``). The real sub-blocks are selected *through the rank masks* (boolean indexing, ascending order) rather than by slicing a prefix, since an edge mask may be gappy after ``+``/``x`` (``docs/uniform_masks_vs_ranks.md``).