ufv_make_frame_masks#

t3toolbox.backend.ufv_masking.ufv_make_frame_masks(up_ranks, down_ranks, left_ranks, right_ranks, nU, nD, rL, rR)#
def ufv_make_frame_masks(
        up_ranks:    NDArray,   # HOST int, (d,)   + stack_shape
        down_ranks:  NDArray,   # HOST int, (d,)   + stack_shape
        left_ranks:  NDArray,   # HOST int, (d+1,) + stack_shape
        right_ranks: NDArray,   # HOST int, (d+1,) + stack_shape
        nU: int,
        nD: int,
        rL: int,
        rR: int,
) -> typ.Tuple[
    NDArray,  # up_mask,    HOST bool, (d,)   + stack_shape + (nU,)
    NDArray,  # down_mask,  HOST bool, (d,)   + stack_shape + (nD,)
    NDArray,  # left_mask,  HOST bool, (d+1,) + stack_shape + (rL,)
    NDArray,  # right_mask, HOST bool, (d+1,) + stack_shape + (rR,)
]:

Build the prefix RANK edge masks for a uniform frame. The physical shape is a separate int tuple (not a mask), so this returns only the four rank masks. HOST numpy (masks are static structure – np, not xnp; see docs/contributor/uniform_pytree_composition.md).

Parameters:
Return type:

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