frames_equal#
- t3toolbox.safety.frames_equal(data1, data2, rtol=None)#
def frames_equal(data1, data2, rtol=None):
Numerical equality of two frames given as nested core tuples (e.g.
T3Frame.data).The honest “same tangent space” test: two frames are the same iff their cores are equal. It accepts the value-equal-but-different-object frames a jit round-trip produces, while rejecting a genuinely different frame. Contract: callers pass real content only – a padded representation (the uniform layer) masks its supercores first (
ufv_apply_frame_masks), so don’t-care padding never participates; this function itself is representation-agnostic and mask-ignorant.rtoldefaults to the ambient jax-aware tolerance (falling back to the defaults if unsafe – this is a pure comparison, mode-agnostic).