-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Define broadcast[!] in Base, and import/extend in module Broadcast? #18462
Comments
Use case? I think we can certainly do so if there's need for it. |
I ran into this while transitioning vectorized |
What would be the best approach? Is naively including |
#17623 implements exactly this, so it should close this issue eventually if we don't do it sooner. |
(Though it doesn't implement |
syntax deprecation for .op method definitions, and removed these deprecations from Base use range + 1, not range .+ 1, to make sure we call the specialized + method that produces a range (not an array) add depwarn for using .+ etc as function objects support dotted pipe operators eliminate most broadcast(::typeof(func), ...) methods, since fusion makes them ~useless; make broadcast produce a BitArray if a Bool array is expected test for .op loop fusion docs for new broadcasting dot-operator behavior define broadcast! earlier (fixes JuliaLang#18462) use specialized code for non-fusing array ± scalar, for performance work around slight slowdown in Diagonal due to broadcast vs. broadcast_elwise_op closes JuliaLang#11053
The module
Broadcast
defines and exportsbroadcast[!]
, andBase
importall
sBroadcast
insysimg.jl
. This arrangement makes definingbroadcast[!]
methods prior to that point insysimg.jl
impossible (asimportall
'ingBroadcast
then throws an existing-identifier-conflict warning for / does not importbroadcast[!]
fromBroadcast
). Simultaneously,Broadcast
's import insysimg.jl
can only happen so early (and only later than some existing vectorized function definitions that should transition to compact broadcast syntax, which is how I ran into this).Instead, should
Base
definebroadcast[!]
, andBroadcast
import/extendbroadcast[!]
fromBase
? Better solutions? Thanks and best!The text was updated successfully, but these errors were encountered: