You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / iscomplexobj

_ArrayFunctionDispatcher

numpy:iscomplexobj

source: /numpy/lib/_type_check_impl.py :270

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 : any

The input can be of any type and shape.

Returns

iscomplexobj : bool

The return value, True if x is 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