check_ufw_pair#

t3toolbox.uniform_frame_variations_format.check_ufw_pair(frame, weights)#
def check_ufw_pair(
        frame:   UT3Frame,          # stack_shape = C
        weights: UT3FrameWeights,   # stack_shape = C -- a weight is FRAME-LIKE: one metric per base point
) -> None:

Check that weights is a metric on the tangent coordinates at this frame.

The uniform twin of check_fw_pair(), and the weight analog of check_ufv_pair(). The stack must equal frame.stack_shape exactly (not merely be a trailing part of it, as when pairing with variations alone), and the four families must match the frame’s variation holes – up <-> nU, down <-> nD, left <-> rL, right <-> rR – in both padded width and rank mask.

Two things uniform must check that ragged gets for free:

  • The exact stack. Absorption only needs the weight’s stack to be the trailing part of the variation stack (UT3FrameWeights.is_consistent_with(), blind to the frame). A K + C weight satisfies that too – it reads as C_w = K + C – so it would silently weight one frame’s K tangents with K different metrics. Only here are both objects present.

  • The masks. Uniform pads every family to a common width, so a mask mismatch is invisible to the shapes and would silently zero a real variation slot. The frame’s masks are gauge-shifted to the variation families exactly as in check_ufv_pair() (frame_left_mask[:-1] / frame_right_mask[1:]: the d+1-th left/right cores are base-point padding, not tangent edges).

Structural (shapes + host-numpy masks) -> raises in both safety modes; jit-safe.

Parameters:
Return type:

None