-
-
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
broadcasting .+ versus "algebraic" + #1953
Comments
Ok. |
Also see #1019 |
Broadcasting |
Would it be acceptable to have |
Sure. I thought we had come up with a nice solution in the first email thread (e.g., https://groups.google.com/d/msg/julia-dev/CXUBlOPov3k/cyUZjzQIJW0J). |
@StefanKarpinski: How about the case of adding a matrix and a scalar:
where |
I'm for this. I think that this was the original conclusion, with Also, there was the prospect to have
i.e. to multiply the scalar with an appropriate identity matrix before adding. Starting out with a conservative |
Broadcasting .+ now implemented. |
https://groups.google.com/d/topic/julia-dev/CXUBlOPov3k/discussion
https://groups.google.com/d/topic/julia-dev/E47eV6B8w78/discussion
I'm opening this issue even though I now actually think we don't need separate
.+
and+
operators. The reason why is here:Basically, matrix multiplication distributes correctly over broadcasting addition if it is even meaningful for it to do so. There are, however, cases where "distributing" doesn't make sense:
From this I tend to conclude that it's reasonable to just have
+
broadcast singleton dimensions instead of introducing a new.+
operator for broadcasting addition.cc: @toivoh
The text was updated successfully, but these errors were encountered: