JuliaArrays / JuliaArrays/BlockArrays.jl
Stack overflow when copying nested block array
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 254
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
Reproducing example:
eachblockrow(x) = (view(x,b,:) for b in blockaxes(x,1))
f(x) = x # just for illustrating use case
m = mortar([mortar([rand(1,j) for k=1:i, _=1:1]) for i=2:4, j=3:5])
Matrix(m) # fine
m_f = mortar(reduce(vcat, blocks.(f.(eachblockrow(m)))))
Matrix(m_f) # stack overflow
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
Run the supplied reproduction and compare the successful Matrix(m) conversion with the stack overflow from Matrix(m_f). Start by tracing the nested mortar, blocks, reduce(vcat), and Matrix paths involved in eachblockrow; done means the reproduced nested block-array conversion no longer overflows the stack.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100