JuliaArrays / JuliaArrays/BlockArrays.jl
v[Block(1,2)] should error
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 254
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
This should throw an error:
julia> v = BlockArray(randn(3),1:2)
2-blocked 3-element BlockVector{Float64, Vector{Vector{Float64}}, Tuple{BlockedUnitRange{ArrayLayouts.RangeCumsum{Int64, UnitRange{Int64}}}}}:
-0.5110413514378647
───────────────────
0.5939308866063546
-0.9983642145180261
julia> v[Block(1,2)]
1×1-blocked 1×1 BlockMatrix{Float64, Matrix{Matrix{Float64}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}:
-0.5110413514378647
Probably missing a blockboundscheck in the view implementation.
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 Julia BlockArrays example, then inspect the view implementation and its blockboundscheck handling. The change is complete when v[Block(1,2)] throws the expected bounds error instead of returning a 1×1 BlockMatrix.
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