numpy sort by rows numpy code example Example: numpy sort row by sorted_array = an_array[numpy.argsort(an_array[:, 1])]