TuckerTensorTrain.allclose#
- t3toolbox.tucker_tensor_train.TuckerTensorTrain.allclose(other, rtol=None, atol=None)#
def allclose( self, other: 'TuckerTensorTrain', 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 mathematical (tensor-level) equality check. The difference is formed as a T3 (ranks add) and its norm taken through orthogonalization – numerically stable exactly when
self ~= other, the optimization-residual case. Structural mismatches (shape / d / stack) raise, as for subtraction. The representation-level (bitwise) check iscorewise_equal();==is intentionally not defined – say which you mean.- Parameters:
other (TuckerTensorTrain)
rtol (Optional[float])
atol (Optional[float])
- Return type: