Skip to content

Commit e7f0d7a

Browse files
committed
Improve definition of unsafe_uview for ArrayOfSimilarArrays
1 parent 4b8b9c5 commit e7f0d7a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/array_of_similar_arrays.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ Base.prepend!(dest::ArrayOfSimilarArrays{T,M,N}, src::AbstractArray{<:AbstractAr
164164
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}) where {T,M,N} =
165165
ArrayOfSimilarArrays{M}(uview(A.data), uview)
166166

167+
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}, I::Vararg{Base.ViewIndex,N}) where {T,M,N} =
168+
view(UnsafeArrays.unsafe_uview(A), I...)
169+
170+
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}, i::Base.ViewIndex) where {T,M,N} =
171+
view(UnsafeArrays.unsafe_uview(A), i)
172+
167173

168174
const VectorOfSimilarArrays{
169175
T, M, L,

0 commit comments

Comments
 (0)