t3_segment#

t3toolbox.backend.t3_operations.t3_segment(data, start=None, stop=None)#
def t3_segment(
        data: typ.Tuple[
            typ.Sequence[NDArray],  # tucker_cores. len=d
            typ.Sequence[NDArray],  # tt_cores.     len=d
        ],
        start: typ.Optional[int] = None,  # Python slice start (None -> 0; negatives wrap)
        stop:  typ.Optional[int] = None,  # Python slice stop  (None -> d; negatives wrap)
) -> typ.Tuple[
    typ.Tuple[NDArray, ...],  # tucker_cores[start:stop]
    typ.Tuple[NDArray, ...],  # tt_cores[start:stop]
]:

Contiguous mode-segment of a T3: slice both core families over modes start:stop.

start/stop follow Python slice semantics (None -> the ends; negatives wrap), with a length >= 1 guard. Inverse of t3_concatenate().

Parameters:
  • data (t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Sequence[NDArray], t3toolbox.backend.common.typ.Sequence[NDArray]])

  • start (t3toolbox.backend.common.typ.Optional[int])

  • stop (t3toolbox.backend.common.typ.Optional[int])

Return type:

t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis]]