We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This line does not work with broadcast styles that have fields, eg
import Broadcast: BroadcastStyle struct MyStyle <: BroadcastStyle some_info end BroadcastStyle(x::MyStyle, y::MyStyle) = MyStyle(compute_field(x.some_info, y.some_info))
A possible fix (in user code) is defining
Broadcast.result_style(::MyStyle, ::MyStyle)
but that function does not seem to be part of the API.
A possible fix (in Julia) would be
result_join(::Any, ::Any, x::S, y::S) where S<:BroadcastStyle = x # just pick the first
I wanted to ask if this matches the intention of #20740 before making a PR.
The text was updated successfully, but these errors were encountered:
Yes, that matches the intent of #49395 also, if you could make a PR
Sorry, something went wrong.
I think it might be x === y ? x : error("custom rule needed") though?
x === y ? x : error("custom rule needed")
Make Broadcast.result_style work on styles with fields. (#50938)
a7eca00
Fixes #50937. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Make Broadcast.result_style work on styles with fields. (JuliaLang#50938
169f435
) Fixes JuliaLang#50937. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
6da8cf3
Successfully merging a pull request may close this issue.
This line does not work with broadcast styles that have fields, eg
A possible fix (in user code) is defining
but that function does not seem to be part of the API.
A possible fix (in Julia) would be
I wanted to ask if this matches the intention of #20740 before making a PR.
The text was updated successfully, but these errors were encountered: