T3Tangent.allclose#

t3toolbox.manifold.T3Tangent.allclose(other, rtol=None, atol=0.0)#
def allclose(
        self,
        other:  'T3Tangent',  # at the SAME frame (checked, like __sub__)

        rtol:   typ.Optional[float] = None,  # None: the ambient jax-aware default (safety.comparison_rtol)
        atol:   float = 0.0,
) -> NDArray:  # bool array, shape = stack_shape (K+C); scalar when unstacked

True (per stack element) if other is the same tangent vector as self at the same frame.

Checks ||self - other|| <= atol + rtol * max(||self||, ||other||) via corewise_norm(), per stacked element (reduce with .all()). The same-frame precondition is checked (by -, as for arithmetic); for tangents at different bases compare dense. Bitwise (frame AND variations): corewise_equal(); == is intentionally not defined – say which you mean.

Parameters:
  • other (T3Tangent)

  • rtol (t3toolbox.backend.common.typ.Optional[float])

  • atol (float)

Return type:

NDArray