argsort for a multidimensional ndarray,"a[np.arange(np.shape(a)[0])[:, (np.newaxis)], np.argsort(a)]"