find all local maxima in an array python