matsortback = np.asarray([row[row[:, 0].argsort()] for row in matsort])