ut3frameweights_to_t3frameweights#
- t3toolbox.backend.ufv_conversions.ut3frameweights_to_t3frameweights(weights)#
def ut3frameweights_to_t3frameweights( weights: typ.Tuple[ NDArray, NDArray, NDArray, NDArray, # up, down, left, right supercores, (d,)+C+(size,) typ.Tuple[NDArray, NDArray, NDArray, NDArray], # the four edge masks ], ) -> typ.Union[ typ.Tuple[typ.Tuple[NDArray, ...], ...], # (up, down, left, right) ragged families, if unstacked typ.Tuple, # else a nested tree (shaped like C) of those ]:
Convert uniform frame-weight supercores + masks back to ragged
T3FrameWeightsfamilies.The frame-weight twin of
ut3frame_to_t3frame(). As there, a stacked weight returns a tree of ragged weights (a varying-rank stack has no single ragged representation), and the real slots are selected through the masks rather than by slicing a prefix, since a mask may be gappy after+/x(docs/uniform_masks_vs_ranks.md).- Parameters:
weights (t3toolbox.backend.common.typ.Tuple[NDArray, NDArray, NDArray, NDArray, t3toolbox.backend.common.typ.Tuple[NDArray, NDArray, NDArray, NDArray]])
- Return type:
t3toolbox.backend.common.typ.Union[t3toolbox.backend.common.typ.Tuple[t3toolbox.backend.common.typ.Tuple[NDArray, Ellipsis], Ellipsis], t3toolbox.backend.common.typ.Tuple]