Skip to main content

sort_complex

Function sort_complex 

Source
pub fn sort_complex<T>(
    a: &Array<Complex<T>, Ix1>,
) -> FerrayResult<Array<Complex<T>, Ix1>>
where T: Element + Float, Complex<T>: Element,
Expand description

Sort a 1-D complex array, comparing first by real part, then by imaginary.

Equivalent to numpy.sort_complex. Always returns a stable sort — matching NumPy’s behavior. Operates on the flattened input.