Skip to content

Relextrema #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Relextrema #154

wants to merge 3 commits into from

Conversation

jsilter
Copy link

@jsilter jsilter commented Sep 9, 2011

Add argrelmin and argrelmax to lib/function_base.py

argrelmin and argrelmax are functions for finding the relative min and max of a set of data. Algorithm is to find points which are smaller (or larger) than their order nearest neighbors, where order is a parameter with a default value of 1. Both call through to _argrelextrama, which takes a comparison function as a parameter. Tests are included.

Add public functions relargmin and relargmax, which each call through to the non-public function _relargextrama. _relargextrama takes a comparator argument, and finds points for which comparator(x[n],x[n+i]) is true for i = +/-1,+/-2,...+/-order.

relargmax uses the comparator numpy.greater, meaning this funtion will return the indices of those locations where x is larger than its `order` nearest neighbors.
@rgommers
Copy link
Member

rgommers commented Sep 9, 2011

Hi Jacob, new additions like this should be discussed on the mailing list first. Can you please bring it up there?

@jsilter
Copy link
Author

jsilter commented Sep 9, 2011

Sure. Sorry, wasn't sure about the etiquette.

On Fri, Sep 9, 2011 at 13:04, Ralf Gommers <
reply@reply.github.com>wrote:

Hi Jacob, new additions like this should be discussed on the mailing list
first. Can you please bring it up there?

Reply to this email directly or view it on GitHub:
#154 (comment)

@jsilter
Copy link
Author

jsilter commented Sep 20, 2011

Moved functionality to scipy, implemented more in-depth algorithm. See https://github.com/jsilter/scipy/tree/find_peaks.

@jsilter jsilter closed this Sep 20, 2011
luyahan pushed a commit to plctlab/numpy that referenced this pull request Apr 25, 2024
feat: Add vclt_[s8|s16|s32|f32|u8|u16|u32]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants