cunumeric.isclose#

cunumeric.isclose(a: ndarray, b: ndarray, rtol: float = 1e-05, atol: float = 1e-08, equal_nan: bool = False) ndarray#

Returns a boolean array where two arrays are element-wise equal within a tolerance.

Parameters:
  • a (array_like) – Input arrays to compare.

  • b (array_like) – Input arrays to compare.

  • rtol (float) – The relative tolerance parameter (see Notes).

  • atol (float) – The absolute tolerance parameter (see Notes).

  • equal_nan (bool) – Whether to compare NaN’s as equal. If True, NaN’s in a will be considered equal to NaN’s in b in the output array.

Returns:

y – Returns a boolean array of where a and b are equal within the given tolerance. If both a and b are scalars, returns a single boolean value.

Return type:

array_like

Notes

For finite values, isclose uses the following equation to test whether two floating point values are equivalent.

absolute(a - b) <= (atol + rtol * absolute(b))

See also

numpy.isclose

Availability:

Multiple GPUs, Multiple CPUs