dpnp.isclose
- dpnp.isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False)[source]
Returns a boolean array where two arrays are element-wise equal within a tolerance.
For full documentation refer to
numpy.isclose.Limitations
x2is supported to be integer ifx1isdpnp.ndarrayor at least eitherx1orx2should be asdpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types.See also
dpnp.allcloseReturns True if two arrays are element-wise equal within a tolerance.
Examples
>>> import dpnp as np >>> x1 = np.array([1e10,1e-7]) >>> x2 = np.array([1.00001e10,1e-8]) >>> out = np.isclose(x1, x2) >>> [i for i in out] [True, False]