check_fw_pair#

t3toolbox.frame_variations_format.check_fw_pair(frame, weights)#
def check_fw_pair(
        frame:   T3Frame,          # stack_shape = C (frame/core stack)
        weights: T3FrameWeights,   # 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 weight<->frame analog of check_fv_pair(). A T3FrameWeights is frame-like: it carries the frame stack C (one metric per base point, shared by every tangent there), and its four families weight the variation holes frame leaves – up``<->``nU, down``<->``nD, left``<->``rL, right``<->``rR. So the stack must match frame.stack_shape exactly (not merely be a trailing part of it, as when pairing with variations alone).

Why the stricter check lives here: absorption only needs the weight’s stack to be the trailing part of the variation stack (fv_weights_consistent(), which is blind to the frame, like the variations themselves). A K + C-stacked weight also satisfies that – it reads as C_w = K + C (that many base points, one tangent each), a legitimate absorption – so it would silently weight a C-framed tangent’s K coordinates with K different metrics. This is the only place where both objects are present, hence the only place with enough information to reject it. Structural (shapes only) -> raises in both safety modes; jit-safe.

Parameters:
Return type:

None