JuliaArrays / JuliaArrays/BlockArrays.jl
Handling zero sized blocks in assignment with broadcast and operation on self
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 254
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
This looks like it might be related to #203 , but I am reporting this for completeness. Assignment in combination with broadcasting does not handle zero-sized blocks correctly:
julia> y = BlockedArray([2.0, 3.0], [1,0,1])
3-blocked 2-element BlockedVector{Float64}:
2.0
───
3.0
julia> z = y .+ 100.0 # correct result
3-blocked 2-element BlockedVector{Float64}:
102.0
─────
103.0
julia> y .+= 100.0 # second block is not acted upon
3-blocked 2-element BlockedVector{Float64}:
102.0
─────
3.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the shown BlockedArray commands, then trace the assignment and broadcasting path used by y .+= 100.0. Done means the zero-sized middle block is handled correctly and the second block changes from 3.0 to 103.0, with a regression test for this example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100