T3Weights.allclose#
- t3toolbox.tucker_tensor_train.T3Weights.allclose(other, rtol=None, atol=None)#
def allclose( self, other: 'T3Weights', 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 edge-weight vectors are numerically equal, per stack element:
||self - other|| <= atol + rtol * max(||self||, ||other||)over the concatenated edge vectors (the weights ARE the mathematical object). Structural mismatches raise. Bitwise:corewise_equal();==is intentionally not defined – say which you mean.