mlx.core.isclose#
- isclose(a: array, b: array, /, rtol: float = 1e-05, atol: float = 1e-08, *, equal_nan: bool = False, stream: None | Stream | Device = None) array #
Returns a boolean array where two arrays are element-wise equal within a tolerance.
Infinite values are considered equal if they have the same sign, NaN values are not equal unless
equal_nan
isTrue
.Two values are considered equal if:
abs(a - b) <= (atol + rtol * abs(b))
Note unlike
array_equal()
, this function supports numpy-style broadcasting.