Skip to content
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

init kwarg on sum!, any!, prod!, etc not documented #38512

Open
oxinabox opened this issue Nov 20, 2020 · 2 comments
Open

init kwarg on sum!, any!, prod!, etc not documented #38512

oxinabox opened this issue Nov 20, 2020 · 2 comments
Labels
doc This change adds or pertains to documentation

Comments

@oxinabox
Copy link
Contributor

A bunch of our special reduction functions with mutating forms, like sum!, any! and prod! have an init keyword argument.
I saw i used in the wild today and i had no idea what it did (well i could guess, but I wanted to check the docstring).

julia> sum!([10, 20], [1 2; 3 4])
2-element Vector{Int64}:
 3
 7

julia> sum!([10, 20], [1 2; 3 4], init=false)
2-element Vector{Int64}:
 13
 27
@mcabbott
Copy link
Contributor

Guilty as charged. And xref #36266 for this.

@simeonschaub
Copy link
Member

This may also be on purpose, see #36305

@kshyatt kshyatt added the doc This change adds or pertains to documentation label Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

4 participants