dpnp.isnan
- dpnp.isnan(x, out=None, where=True, order='K', dtype=None, subok=True, **kwargs)
Test if each element of an input array is a NaN.
For full documentation refer to
numpy.isnan.- Parameters:
x ({dpnp.ndarray, usm_ndarray}) -- Input array, expected to have numeric data type.
out ({None, dpnp.ndarray, usm_ndarray}, optional) --
Output array to populate. Array must have the correct shape and the expected data type.
Default:
None.order ({None, "C", "F", "A", "K"}, optional) --
Memory layout of the newly output array, if parameter out is
None.Default:
"K".
- Returns:
out -- An array which is True where x is
NaN, False otherwise.- Return type:
dpnp.ndarray of bool dtype
Limitations
Parameters where and subok are supported with their default values. Otherwise
NotImplementedErrorexception will be raised.See also
dpnp.isinfTest element-wise for positive or negative infinity.
dpnp.isneginfTest element-wise for negative infinity, return result as bool array.
dpnp.isposinfTest element-wise for positive infinity, return result as bool array.
dpnp.isfiniteTest element-wise for finiteness.
Examples
>>> import dpnp as np >>> x = np.array([np.inf, 0., np.nan]) >>> np.isnan(x) array([False, False, True])