Given a Numpy array/matrix, what is pythonic way to count the number of complex, pure real and pure imaginary number: Note: Please ignore the fact that complex numbers are superset of Imaginary and Real numbers. Answer complex A number is complex if and only if its imaginary part is not zero, and its real part is not zero. Therefore: pure