Timeline for Finding local maxima/minima with Numpy in a 1D numpy array
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 29, 2021 at 10:45 | history | edited | desertnaut | CC BY-SA 4.0 |
deleted 44 characters in body
|
| May 31, 2016 at 18:16 | history | edited | Cleb | CC BY-SA 3.0 |
highltighting
|
| Apr 25, 2011 at 15:05 | comment | added | user723888 | I needed something similar for a project I was working on and used the numpy.diff method mentioned above, I thought it may be helpful to mention that for my data the above code missed a few maxima and minima, by changing the middle term in both if statements to <= and >= respectively, I was able to catch all the points. | |
| Jan 27, 2011 at 18:08 | history | edited | Mike Vella | CC BY-SA 2.5 |
updated method to use numpy.diff instead of numpy.gradient
|
| Jan 27, 2011 at 15:41 | comment | added | Mike Vella | Yes I know, however noisy data is a different issue. For that I guess use convolve. | |
| Jan 27, 2011 at 15:39 | history | edited | Mike Vella | CC BY-SA 2.5 |
wrote the actual code
|
| Jan 27, 2011 at 15:09 | comment | added | Navi | Do you know how this gradient is calculated? If you have noisy data probably the gradient changes a lot, but that doesn't have to mean that there is a max/min. | |
| Jan 27, 2011 at 13:20 | history | answered | Mike Vella | CC BY-SA 2.5 |