t3variations_to_ut3variations ============================= .. py:function:: t3toolbox.backend.ufv_conversions.t3variations_to_ut3variations(variations_data, N = None, nU = None, nD = None, rL = None, rR = None) .. code-block:: python def t3variations_to_ut3variations( variations_data: typ.Tuple[ typ.Tuple[NDArray, ...], # tucker_variations, len=d, elm_shape=C+(nDi, Ni) typ.Tuple[NDArray, ...], # tt_variations, len=d, elm_shape=C+(rLi, nUi, rR(i+1)) ], N: typ.Optional[int] = None, # padded mode dim (default max(shape)) nU: typ.Optional[int] = None, # padded up rank (default max(up_ranks)) nD: typ.Optional[int] = None, # padded down rank (default max(down_ranks)) rL: typ.Optional[int] = None, # padded left rank (default max(left_ranks)) rR: typ.Optional[int] = None, # padded right rank (default max(right_ranks)) ) -> typ.Tuple[ NDArray, # tucker_variations supercore, (d,)+C+(nD, N) NDArray, # tt_variations supercore, (d,)+C+(rL, nU, rR) typ.Tuple[int, ...], # shape typ.Tuple[NDArray, NDArray, NDArray, NDArray], # (variations up, down, left, right) masks, all (d,)-leading ]: Pack a ragged ``T3Variations`` core-tuple into uniform variation ``.data``. Inverse of :py:func:`ut3variations_to_t3variations`. The variation masks are all ``(d,)``-leading (a variation occupies one TT slot, not a boundary edge), so the left/right ranks are the per-slot bonds ``rLi`` / ``rR(i+1)`` -- NOT a ``(d+1,)`` edge sequence. ``ufv_make_frame_masks`` builds the prefix masks from whatever leading shape its rank args carry, so it serves here too.