Skip to content

Conversation

@dlfivefifty
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #193 (23a3aad) into master (d4c8b6a) will decrease coverage by 0.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
- Coverage   92.00%   91.82%   -0.19%     
==========================================
  Files          14       14              
  Lines        1264     1272       +8     
==========================================
+ Hits         1163     1168       +5     
- Misses        101      104       +3     
Impacted Files Coverage Δ
src/blockbroadcast.jl 92.68% <100.00%> (-1.24%) ⬇️
src/views.jl 87.83% <0.00%> (-1.36%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d4c8b6a...23a3aad. Read the comment docs.

@dlfivefifty dlfivefifty merged commit 4d1e02f into master Oct 3, 2021
@dlfivefifty dlfivefifty deleted the dl/pseudobroadcast branch October 3, 2021 11:42
dlfivefifty pushed a commit that referenced this pull request Sep 4, 2025
Fixes #295. That issue seemed to be caused by code in the generic block
broadcasting logic such as
https://github.com/JuliaArrays/BlockArrays.jl/blob/90ddfa96fb0ade3da4f67ac285fcb340350c19c6/src/blockbroadcast.jl#L121-L129
assuming the broadcasting expression is already flat. This PR adds a
call to `Broadcast.flatten` to explicitly flatten the broadcast
expression in the generic block broadcast code.

It appears that at some point `BlockedStyle` broadcasting expressions
were being flattened in this `Broadcast.instantiate` definition:
https://github.com/JuliaArrays/BlockArrays.jl/blob/90ddfa96fb0ade3da4f67ac285fcb340350c19c6/src/blockbroadcast.jl#L199-L202
but that was changed in #193. Reverting that change broke the tests
introduced in #193 so I guess it is not safe to do that.

I have to admit I'm not sure if this is the best place to call
`Broadcast.flatten`, a lot of this broadcasting code is hard to follow.
The place I put it in this PR fixes #295, doesn't break other tests, and
is hopefully least likely to interfere with custom implementations of
block broadcasting in downstream packages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants