xorbits.numpy.iscomplex#
- xorbits.numpy.iscomplex(x, **kwargs)[源代码]#
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.
- 参数
x (array_like) – Input array.
- 返回
out – Output array.
- 返回类型
ndarray of bools
实际案例
>>> np.iscomplex([1+1j, 1+0j, 4.5, 3, 2, 2j]) array([ True, False, False, False, False, True])
This docstring was copied from numpy.