This is a pre-release version (latest). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy latest / numpy / iscomplex

_ArrayFunctionDispatcher

numpy:iscomplex

source: /dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/lib/_type_check_impl.py :175

Signature

def   iscomplex ( x )

Summary

Returns a bool array, where True if input element is complex.

Extended Summary

What is tested is whether the input has a non-zero imaginary part, not if the input type is complex.

Parameters

x : array_like

Input array.

Returns

out : ndarray of bools

Output array.

Examples

import numpy as np
np.iscomplex([1+1j, 1+0j, 4.5, 3, 2, 2j])

See also

iscomplexobj

Return True if x is a complex type or an array of complex numbers.

isreal

Aliases

  • numpy.iscomplex