![]() |
VOOZH | about |
numpy.iscomplexobj(array) : This logical function helps to checks for the complex type of an array or array of a complex number. Even if imaginary part is equal to zero, it is considered to be an Complex Object.
Parameters :
array : [array_like]Input array or object whose elements, we need to test.
Return :
True, if the input array has a complex element; otherwise False
Code 1 :
Output :
Input array : [1, 3, 5, 4] Is complex : False
Code 2 :
Output :
Is complex : False class 'complex' Is complex : False Is complex : True
References :
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.iscomplexobj.html#numpy.iscomplexobj