This is documentation for an old release of NumPy (version 1.7.0). Read this page in the documentation of the latest stable release (version > 1.17).
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, iscomplexobj evaluates to True.
Parameters : | x : any
|
---|---|
Returns : | iscomplexobj : bool
|
Examples
>>> np.iscomplexobj(1)
False
>>> np.iscomplexobj(1+0j)
True
>>> np.iscomplexobj([3, 1+0j, True])
True