cupy.isclose#
- cupy.isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source]#
Returns a boolean array where two arrays are equal within a tolerance.
Two values in
a
andb
are considiered equal when the following equation is satisfied.\[|a - b| \le \mathrm{atol} + \mathrm{rtol} |b|\]- Parameters
a (cupy.ndarray) – Input array to compare.
b (cupy.ndarray) – Input array to compare.
rtol (float) – The relative tolerance.
atol (float) – The absolute tolerance.
equal_nan (bool) – If
True
, NaN’s ina
will be considered equal to NaN’s inb
.
- Returns
A boolean array storing where
a
andb
are equal.- Return type
See also