Reputation: 21
I'm wondering when using Scipy api (as the code below) to find the local maximum and local minimum, the result (as the picture attached) are seems to be not accuracy as imagine. Is there any tips or method which can increase the accuracy?
argrelextrema(z, np.greater)
argrelextrema(z, np.less)
Please comment to me if you have any ideas, that will help me a lot. So many thanks. :))
Upvotes: 0
Views: 187
Reputation: 2271
I appears that you mark the next one after the min/max as the min or max, just subtract 1
from the indexes of your local mins/maxes.
Upvotes: 0