Skip to content

Commit 9df7c94

Browse files
committed
forward view to parent for PseudoBlockArray
1 parent 1eb848f commit 9df7c94

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/views.jl

+7
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ end
169169

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

172+
# PseudoBlockArray
173+
174+
function view(A::PseudoBlockArray, inds::Union{Int, AbstractArray{Int}, Colon}...)
175+
indsparent = to_indices(A, inds)
176+
view(A.blocks, indsparent...)
177+
end
178+
172179
@propagate_inbounds getindex(v::LinearAlgebra.AdjOrTransAbsVec, ::Colon, is::AbstractArray{<:Block{1}}) = LinearAlgebra.wrapperop(v)(v.parent[is])
173180

174181

0 commit comments

Comments
 (0)