def peaks(samples):
max_index = numpy.argmax(samples)<EOL>max_value = samples[max_index]<EOL>min_index = numpy.argmin(samples)<EOL>min_value = samples[min_index]<EOL>if min_index < max_index:<EOL><INDENT>return (min_value, max_value)<EOL><DEDENT>else:<EOL><INDENT>return (max_value, min_value)<EOL><DEDENT>
Find the minimum and maximum peak of the samples.
    Returns that pair in the order they were found.
    So if min was found first, it returns (min, max) else the other way around.