ut3variations_to_t3variations ============================= .. py:function:: t3toolbox.backend.ufv_conversions.ut3variations_to_t3variations(x) .. code-block:: python def ut3variations_to_t3variations( x: typ.Tuple[ NDArray, # tucker_variations, (d,)+C+(nD, N) NDArray, # tt_variations, (d,)+C+(rL, nU, rR) typ.Tuple[int, ...], # shape typ.Tuple[ # (variations up, down, left, right) masks NDArray, NDArray, NDArray, NDArray, ], ], ) -> typ.Union[ typ.Tuple[typ.Tuple[NDArray, ...], typ.Tuple[NDArray, ...]], # (tucker_variations, tt_variations), if unstacked typ.Tuple, # else a nested tree (shape stack_shape) of those ]: Convert uniform ``UT3Variations`` ``.data`` to ragged ``T3Variations`` core-tuples (or a tree, if stacked). Variations twin of :py:func:`ut3frame_to_t3frame`. The physical mode dim is a prefix (slices ``[:Ni]`` from ``shape``); the rank masks scatter, so they extract with ``np.argwhere`` (HOST numpy). The variation tt-core ``H_i`` has shape ``(rLi, nUi, rR(i+1))`` -- left/up/right masks index its three axes.