zipsort

emlib.numpytools.zipsort(a, b)[source]

Sort one array, keep the other synched

Equivalent to:

a, b = unzip(sorted(zip(a, b)))

If a and b are two columns of data, sort a keeping b in sync

Return type:

Tuple[np.ndarray, np.ndarray]