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 Apr 2, 2024
1 parent ee08389 commit 0b44040
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 @@ -170,6 +170,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...)

Check warning on line 177 in src/views.jl

View check run for this annotation

Codecov / codecov/patch

src/views.jl#L175-L177

Added lines #L175 - L177 were not covered by tests
end

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


Expand Down

0 comments on commit 0b44040

Please sign in to comment.