cupy.iscomplex#
- cupy.iscomplex(x)[source]#
Returns a bool array, where True if input element is complex.
What is tested is whether the input has a non-zero imaginary part, not if the input type is complex.
- Parameters:
x (cupy.ndarray) – Input array.
- Returns:
Boolean array of the same shape as
x
.- Return type:
See also
Examples
>>> cupy.iscomplex(cupy.array([1+1j, 1+0j, 4.5, 3, 2, 2j])) array([ True, False, False, False, False, True])