ufv_stack_axes#
- t3toolbox.backend.ufv_operations.ufv_stack_axes(xx, n_supercores, axes_start)#
def ufv_stack_axes( xx, # nested tuple (shaped like the stacked sub-run) of bv .data leaves n_supercores: int, # 4 (frame) or 2 (variations) axes_start: int, # array axis the OUTERMOST new stack level lands on (others follow contiguously) ) -> typ.Tuple: # one stacked bv .data tuple (*supercores, shape, masks)
Stack an array-like tree of bv
.dataleaves onto a CONTIGUOUS run of array axes starting ataxes_start. Inverse ofufv_unstack_axes().Generalizes
ufv_stack()(which stacks onto axes1 ..) so the tangent layer can slot a new stack run at the right place – e.g. the frame stackCafter an existing tangent stackK(ataxes_start = 1 + |K|), keepingCinner.shapeis read once (shared) and supercores/masks are stacked in SEPARATEstacking.stack()calls so the host-numpy masks are not promoted to jax.- Parameters:
n_supercores (int)
axes_start (int)
- Return type:
t3toolbox.backend.common.typ.Tuple