ut3frame_to_t3frame =================== .. py:function:: t3toolbox.backend.ufv_conversions.ut3frame_to_t3frame(x) .. code-block:: python def ut3frame_to_t3frame( x: typ.Tuple[ NDArray, # up_tucker_supercore NDArray, # down_tt_supercore NDArray, # left_tt_supercore NDArray, # right_tt_supercore typ.Tuple[int, ...], # shape typ.Tuple[ # (up_mask, down_mask, frame_left_mask, frame_right_mask) NDArray, NDArray, NDArray, NDArray, ], ], ) -> typ.Union[ typ.Tuple[typ.Tuple[NDArray, ...], ...], # (up_cores, down_cores, left_cores, right_cores), if unstacked typ.Tuple, # else a nested tree (shaped like stack_shape) of those ]: Convert a uniform UT3Frame ``.data`` to ragged ``T3Frame`` core-tuples (or a nested tree, if stacked). The physical mode dims are a contiguous prefix, so they slice ``[:Ni]`` (from the ``shape`` ints, no argwhere); only the *rank* masks scatter, so they are extracted with ``np.argwhere`` (HOST numpy -- masks are host). The supercores may be jax; advanced-indexing them with the host int indices is fine.