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.iscomplexobjevaluates 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,
Trueif x is of a complex type or has at least one complex element.- Return type:
See also
dpnp.isrealobjReturn
Trueif x is a not complex type or an array of complex numbers.dpnp.iscomplexReturns a bool array, where
Trueif 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