Can you suggest a module function from numpy/scipy that can find local maxima/minima in a 1D numpy array? Obviously the simplest approach ever is to have a look at the neare
If you are looking for all entries in the 1d array a smaller than their neighbors, you can try
a
numpy.r_[True, a[1:] < a[:-1]] & numpy.r_[a[:-1] < a[1:], True]
You could also smooth your array before this step using numpy.convolve().
numpy.convolve()
I don't think there is a dedicated function for this.