UniformTuckerTensorTrain.allclose#

t3toolbox.uniform_tucker_tensor_train.UniformTuckerTensorTrain.allclose(other, rtol=None, atol=None)#
def allclose(
        self,
        other: 'UniformTuckerTensorTrain',

        rtol:  typ.Optional[float] = None,  # None: the ambient jax-aware default (safety.comparison_rtol)
        atol:  typ.Optional[float] = None,  # None: 0.0
) -> NDArray:  # bool, shape=stack_shape (0-d unstacked); reduce with .all()

True where the REPRESENTED tensors are numerically equal, per stack element: ||self - other|| <= atol + rtol * max(||self||, ||other||) (the uniform twin of numerically_equal(); the difference-and-orthogonalized-norm route, stable when self ~= other). Structural mismatches (shape / d / stack) raise, as for subtraction; padded widths need not match. The bitwise representation check is corewise_equal(); == is intentionally not defined.

Parameters:
Return type:

NDArray