dpnp.isreal
- dpnp.isreal(x)[source]
Returns a bool array, where
Trueif input element is real.If element has complex type with zero imaginary part, the return value for that element is
True.For full documentation refer to
numpy.isreal.- Parameters:
x ({dpnp.ndarray, usm_ndarray}) -- Input array.
- Returns:
out -- An array of same shape as x.
- Return type:
dpnp.ndarray of bool dtype
See also
dpnp.iscomplexReturns a bool array, where
Trueif input element is complex.dpnp.isrealobjReturn
Trueif x is not a complex type.
Examples
>>> import dpnp as np >>> a = np.array([1+1j, 1+0j, 4.5, 3, 2, 2j]) >>> np.isreal(a) array([False, True, True, True, True, False])