-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Missing value not working with argmax
and findmax
#29305
Comments
The problem is that I guess one solution would be to define |
What should |
Throwing an error as currently is fine IMO, but we could also return
Yes, that's tricky, which is why it isn't currently implemented. I guess the most useful behavior would be to refer to the keys of the original array (giving
|
I expect
|
I didn't suggest to define |
In climate science, we work a lot with missing values (weather stations are notorious for being bad at being consistent in their recording). The use of argmax in climate data would be to find the timestamp of a maximum value. Hence, in this case, |
I've just run into this issue as well. Another possible solution (though I don't know if it's better than the suggestions already articulated) would be to have something like
The reason for point 2 IMO is that it would be weird if
could give a bounds error. Edit to clarify - My proposal would be that |
We really can't start adding |
Fair enough - if |
See mini Julep at #30606. |
#31008 fixes this issue. |
My goal is to find the index of the maximum of an array containing missing values :
This is working as I expected, however returning the index does not:
I don't think I should get an error in any of these cases, but rather propagate the missing value or skip it.
Notice that it cannot be done with NaNs either because NaNs = ±Inf in this context
The text was updated successfully, but these errors were encountered: