Hi, How can I emulate Matlab's sort function for complex numbers in scipy ? Nils BTW, this is Matlab's policy. When X is complex, the elements are sorted by ABS(X). Complex matches are further sorted by ANGLE(X).