numpy.amax() will find the max value in an array, and numpy.amin() does the same for the min value. If I want to find both max and min, I have to call both functions, which
There is a function for finding (max-min) called numpy.ptp if that's useful for you:
>>> import numpy >>> x = numpy.array([1,2,3,4,5,6]) >>> x.ptp() 5
but I don't think there's a way to find both min and max with one traversal.
EDIT: ptp just calls min and max under the hood