You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The broadcast implementation tries to find the first NamedArray in the expression tree, but fails when a subtree doesn't have a NamedArray. For example:
bc = Base.broadcasted(+, Base.broadcasted(*, [1., 2., 3.], 2.), NamedArray([1,2,3]))
copy(bc) # throws BoundsError: attempt to access () at index [1]
Quick and dirty fix is to add the terminating case
find_namedarray(x::Tuple{}) = ()
I'm not really familiar with broadcasting, but I think the names could be encoded into the broadcast-style as well.
The text was updated successfully, but these errors were encountered:
I've just been dealing with this broadcasting code... I didn't write it so I had to study it a little. What is the actual use case for this error? I assume you don't work with raw Base.broadcasted?
The broadcast implementation tries to find the first NamedArray in the expression tree, but fails when a subtree doesn't have a NamedArray. For example:
Quick and dirty fix is to add the terminating case
I'm not really familiar with broadcasting, but I think the names could be encoded into the broadcast-style as well.
The text was updated successfully, but these errors were encountered: