bundles / numpy 2.4.4 / numpy / iscomplexobj
_ArrayFunctionDispatcher
numpy:iscomplexobj
Signature
def iscomplexobj ( x ) Summary
Check for a complex type or an array of complex numbers.
Extended Summary
The type of the input is checked, not the value. Even if the input has an imaginary part equal to zero, iscomplexobj evaluates to True.
Parameters
x: anyThe input can be of any type and shape.
Returns
iscomplexobj: boolThe return value, True if
xis of a complex type or has at least one complex element.
Examples
import numpy as np np.iscomplexobj(1) np.iscomplexobj(1+0j) np.iscomplexobj([3, 1+0j, True])✓
See also
- iscomplex
- isrealobj
Aliases
-
numpy.iscomplexobj