-
-
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
add more methods and tests for reductions over empty arrays #29919
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this so that the doctest passes?
Bump. Needs doctest fixes. Otherwise good to go. |
Now that we have #41885 will print a nice warning suggesting to supply an |
But 👍 to more tests! |
Is it OK to get |
Let's figure out if this is OK to merge and then merge it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'm opposed to this change. We don't know the domain on which the user data is defined and we don't know if typemin
and typemax
are meaningful values (see an example above). I think nudging users to specify the identity element via init
will help them write more robust programs.
That said, I think the following tweaks might make sense if we go with this.
Triage thinks it's ok to add these, with tkf's suggestions. |
Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com>
Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com>
Co-authored-by: Takafumi Arakaki <aka.tkf@gmail.com>
From discussion in #28535.