cupy.allclose¶
-
cupy.
allclose
(a, b, rtol=1e-05, atol=1e-08, equal_nan=False)[source]¶ Returns True if two arrays are element-wise 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: - if
True
, two arrays are element-wise equal within a tolerance.
Return type: See also