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

broadcast!(f, A, x::Number...) should call f(x...) independently for each A[i] #19799

Merged
merged 2 commits into from
Jan 1, 2017

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Dec 31, 2016

This corrects for an omission in #19722.

Technically, this is a breaking change compared to 0.5. However, it can also be viewed as a restoration of Julia-0.4 behavior that was unintentionally changed in 0.5, and which so far no one has noticed. (However, this will become much more important nowadays given dot-call syntax, e.g. if someone does x .= rand.() .+ 1 ala #19796.)

@stevengj stevengj added the broadcast Applying a function over a collection label Dec 31, 2016
@@ -376,6 +376,7 @@ end

# Check that broadcast!(f, A) populates A via independent calls to f (#12277, #19722).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps expand the test description with a note on broadcast!(f, A, x::Number...) and reference this pull request?

@Sacha0
Copy link
Member

Sacha0 commented Dec 31, 2016

Looks great! Thanks for fixing this method!

@tkelman tkelman merged commit b2ae5a5 into JuliaLang:master Jan 1, 2017
@stevengj stevengj deleted the bcastfix branch January 1, 2017 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants