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
weightsis a metric on the tangent coordinates at this frame.The uniform twin of
check_fw_pair(), and the weight analog ofcheck_ufv_pair(). The stack must equalframe.stack_shapeexactly (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). AK + Cweight satisfies that too – it reads asC_w = K + C– so it would silently weight one frame’sKtangents withKdifferent 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:]: thed+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:
frame (UT3Frame)
weights (UT3FrameWeights)
- Return type:
None