-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Support init
keyword in sum
/prod
/maximum
/minimum
#36188
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ed1cfc9
Support `init` keyword in `maximum`/`minimum`
timholy a9fd8b8
Add `init` keyword argument to `sum` and `prod`
tkf 16b13d2
Merge remote-tracking branch 'origin/teh/reduce_init' into sum-init
tkf 72d01c0
Test sum and prod
tkf c3e66a5
Add compat annotations to `minimum` and `maximum`
tkf 31feb69
Tweak docstring signature style
tkf 32e0c99
Fix reflection doctest
tkf b8a686b
Add a NEWS item
tkf 749e2ce
Fix `sum(::AbstractArray{Bool}; dims)`
tkf bf551a7
Fix a typo
tkf e1173cb
Fix sum(::AbstractArray{Bool}) optimization path
tkf 791f93c
Apply suggestions from code review
tkf 2b84499
Reflect the same changes to other docstrings
tkf 2122e0e
Mention how `nothing` is used in the test
tkf 6918213
Demonstrate `init` for `sum` and `prod`
tkf ea2cc8b
Reflect the same changes to other docstrings (2)
tkf 32d7f93
Use `function noncallable end`
tkf 3e7b09c
Use init=Inf for minimum docstring
tkf 0791d49
Apply suggestions from code review
tkf 923bbd8
Revert: maximum(length, []; init=-1)
tkf 0050d4f
Use typemax(Int64) for minimum(length, []; init=typemax(Int64))
tkf 6951b2c
Yet another example: minimum(tanh, Real[]; init=1.0)
tkf 04c0cc9
Yet another example: maximum(tanh, Real[]; init=-1.0)
tkf 5d952ec
Apply suggestions from code review
tkf 42a0155
A short note on the output bound of tanh
tkf 254a7cb
Use sin instead of tanh
tkf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.