Skip to content

Commit 0b44040

Browse files
committed
forward view to parent for PseudoBlockArray
1 parent ee08389 commit 0b44040

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
@@ -170,6 +170,13 @@ end
170170

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

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

175182

0 commit comments

Comments
 (0)