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 ofnumerically_equal(); the difference-and-orthogonalized-norm route, stable whenself ~= other). Structural mismatches (shape / d / stack) raise, as for subtraction; padded widths need not match. The bitwise representation check iscorewise_equal();==is intentionally not defined.- Parameters:
other (UniformTuckerTensorTrain)
rtol (Optional[float])
atol (Optional[float])
- Return type: