list.sort() returns if the sorting was sccessful. Changed to numpy.sort()