-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
argrelmin/argrelmax fail with smooth data and plateaus #6848
Comments
Essentially the same issue as #3749. |
Here is some code that is one possible fix for _boolrelextrema:
It makes assumptions about how you want to report the duplicates, but it's workable for me atm. |
Bah, sorry for the dupe @person142. Feel free to close/reference this from there if you wish. |
@Chris7 Since it is referenced already, you can close this one yourself anyways. |
The other doesn't mention
any interest in turning that into a PR? |
I can try. I don't know how I can really translate it to the multi-dimensional case. Since what I am in effect doing is popping out the duplicates, that will quickly fail once I am working with anything > 1d. |
There is now an alternative to |
There are certain cases that argrelmin/max will fail due to the comparator being used. For instance:
returns
(array([], dtype=int64),)
This happens because the comparator is np.greater. Should this be fixed to provide some resolution or is this the desired behavior?
The text was updated successfully, but these errors were encountered: