This is documentation for an old release of NumPy (version 1.3.). Read this page in the documentation of the latest stable release (version > 1.17).
Return a bool array, True if element is complex (non-zero imaginary part).
For scalars, return a boolean.
Parameters: | x : array_like
|
---|---|
Returns: | out : ndarray, bool
|
Examples
>>> x = np.array([1,2,3.j])
>>> np.iscomplex(x)
array([False, False, True], dtype=bool)