-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StackOverFlow Error #106
Comments
Same as JuliaArrays/BlockArrays.jl#120 would love a PR fixing this |
What does this code serve for? In which case does the right hand side not refer back again? @inline @propagate_inbounds Base.view(block_arr::AbstractBlockArray, block::Block{1}...) = view(block_arr, Block(block)) https://github.com/JuliaArrays/BlockArrays.jl/blob/master/src/abstractblockarray.jl#L129 |
It would be super easy to achieve only |
This converts, for example, This seems to work (leveraging the code for standard arrays using linear indexing): julia> A = BlockArray(randn(3,3), [2,1], [2,1])
2×2-blocked 3×3 BlockArray{Float64,2}:
-0.115769 0.690882 │ -1.04413
0.661802 -0.217254 │ -0.272209
──────────────────────┼───────────
0.433854 0.501771 │ -0.884769
julia> Base.view(A::AbstractBlockArray, B::Block{1}) = view(A, Block(Base._ind2sub(map(Base.OneTo, blocksize(A)), Int(B))...))
julia> view(A, Block(3))
2×1 Matrix{Float64}:
-1.0441288027748936
-0.2722086284730829 |
An error is expected, but not stack overflow maybe?
The text was updated successfully, but these errors were encountered: