dpnp.isnan

dpnp.isnan(x1, out=None, **kwargs)[source]

Test element-wise for NaN and return result as a boolean array.

For full documentation refer to numpy.isnan.

Limitations

Input array is supported as dpnp.ndarray. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP Data types. Parameter out is supported only with default value None. Parameter where is supported only with default value True.

See also

dpnp.isinf

Test element-wise for positive or negative infinity.

dpnp.isneginf

Test element-wise for negative infinity, return result as bool array.

dpnp.isposinf

Test element-wise for positive infinity, return result as bool array.

dpnp.isfinite

Test element-wise for finiteness.

dpnp.isnat

Test element-wise for NaT (not a time) and return result as a boolean array.

Examples

>>> import numpy
>>> import dpnp as np
>>> x = np.array([numpy.inf, 0., np.nan])
>>> out = np.isnan(x)
>>> [i for i in out]
[False, False, True]