ufv_unstack_axes#
- t3toolbox.backend.ufv_operations.ufv_unstack_axes(data, n_supercores, axes)#
def ufv_unstack_axes( data: typ.Tuple, # (*supercores, shape, masks): n_supercores arrays, int-tuple, 4-tuple of masks n_supercores: int, # 4 (frame) or 2 (variations) axes: typ.Sequence[int], # the array axes to peel into tree levels (a CONTIGUOUS run within the stack) ): # -> nested tuple (shaped like the peeled axes) of bv .data leaves carrying the remaining stack
Unstack a bv
.datatuple along the GIVEN array axes (a sub-run of the stack), leaving the rest.Generalizes
ufv_unstack()(which peels the whole stack) to a contiguous sub-run – the primitive the tangent layer needs to split aK + Cvariation stack into just itsKpart or just itsCpart. The supercores and all four rank masks slice alongaxes(they share those stack-axis positions; the masks’ leadingdvsd+1is irrelevant since onlyaxesare touched);shapeis shared and replicated onto every leaf.- Parameters:
data (t3toolbox.backend.common.typ.Tuple)
n_supercores (int)
axes (t3toolbox.backend.common.typ.Sequence[int])