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 and b 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 in a will be considered equal to NaN’s in b.

Returns:

A boolean array storing where a and b are equal.

Return type:

cupy.ndarray

See also

numpy.isclose()