dpnp.iscomplexobj
- dpnp.iscomplexobj(x)[source]
Check for a complex type or an array of complex numbers.
The type of the input is checked, not the value. Even if the input has an imaginary part equal to zero,
dpnp.iscomplexobj
evaluates toTrue
.For full documentation refer to
numpy.iscomplexobj
.- Parameters:
x (array_like) -- Input data, in any form that can be converted to an array. This includes scalars, lists, lists of tuples, tuples, tuples of tuples, tuples of lists, and ndarrays.
- Returns:
out -- The return value,
True
if x is of a complex type or has at least one complex element.- Return type:
See also
dpnp.isrealobj
Return
True
if x is a not complex type or an array of complex numbers.dpnp.iscomplex
Returns a bool array, where
True
if input element is complex.
Examples
>>> import dpnp as np >>> np.iscomplexobj(1) False >>> np.iscomplexobj(1+0j) True >>> np.iscomplexobj([3, 1+0j, True]) True