- scipp.isclose(x, y, *, rtol=None, atol=None, equal_nan=False)#
Checks element-wise if the inputs are close to each other.
Compares values of x and y element by element against absolute and relative tolerances according to (non-symmetric)
abs(x - y) <= atol + rtol * abs(y)
If both x and y have variances, the variances are also compared between elements. In this case, both values and variances must be within the computed tolerance limits. That is:
abs(x.value - y.value) <= atol + rtol * abs(y.value) and abs(sqrt(x.variance) - sqrt(y.variance)) <= atol + rtol * abs(sqrt(y.variance))
Vectors and matrices are compared element-wise. This is not necessarily a good measure for the similarity of spatial dtypes like
Variable) – Left input.
Variable) – Right input.
False) – If true, non-finite values at the same index in (x, y) are treated as equal. Signbit must match for infs.
Variable– Variable same size as input. Element True if absolute diff of value <= atol + rtol * abs(y), otherwise False.