-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
broadcastApplying a function over a collectionApplying a function over a collectiondocsThis change adds or pertains to documentationThis change adds or pertains to documentation
Description
the broadcasting docs mention this optional method to define implace broadcast assignment:
Customizing broadcasting
| Methods to implement | Brief description |
|---|---|
| ... | ... |
| Bypassing default machinery | |
Base.copyto!(dest, bc::Broadcasted{DestStyle}) |
Custom implementation of broadcast!, specializing on DestStyle |
| ... | ... |
But defining copyto!(x<:Any,bc::Broadcasted{DestSyle}) causes ambiguity errors for any subsequent package that needs to do the same. i found this recently in StaticArrays + DataFrames JuliaArrays/StaticArrays.jl#1097 , where StaticArrays defines Base.copyto!(dest, B::Broadcasted{<:StaticArrayStyle}), causing ambiguity errors down the line, while following the docs.
Metadata
Metadata
Assignees
Labels
broadcastApplying a function over a collectionApplying a function over a collectiondocsThis change adds or pertains to documentationThis change adds or pertains to documentation