Skip to content

Commit

Permalink
forward view to parent for PseudoBlockArray
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Jun 28, 2023
1 parent 1eb848f commit 9df7c94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/views.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ end

view(A::AdjOrTrans{<:Any,<:BlockArray}, K::Block{1}, J::Block{1}) = view(A, Block(Int(K), Int(J)))

# PseudoBlockArray

function view(A::PseudoBlockArray, inds::Union{Int, AbstractArray{Int}, Colon}...)
indsparent = to_indices(A, inds)
view(A.blocks, indsparent...)
end

@propagate_inbounds getindex(v::LinearAlgebra.AdjOrTransAbsVec, ::Colon, is::AbstractArray{<:Block{1}}) = LinearAlgebra.wrapperop(v)(v.parent[is])


Expand Down

0 comments on commit 9df7c94

Please sign in to comment.