Complex numbers
Complex numbers are numbers that have a real and imaginary part. As you remember from previous chapters, NumPy has special complex data types that represent complex numbers by two floating-point numbers. These numbers can be sorted using the NumPy sort_complex()
function. This function sorts the real part first and then the imaginary part.