Skip to content

Commit c3b50cc

Browse files
committed
Simplify implementation of unsafe_uview for ArrayOfSimilarArrays
1 parent e7f0d7a commit c3b50cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/array_of_similar_arrays.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ Base.prepend!(dest::ArrayOfSimilarArrays{T,M,N}, src::AbstractArray{<:AbstractAr
161161
# ArrayOfSimilarArrays{M}(A.data, viewfunc)
162162

163163

164-
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}) where {T,M,N} =
165-
ArrayOfSimilarArrays{M}(uview(A.data), uview)
164+
# TODO: implement:
165+
#
166+
# Base.unsafe_view(A::ArrayOfSimilarArrays{T,M,N}, I::Vararg{Base.ViewIndex,N}) where {T,M,N}
167+
# Base.unsafe_view(A::ArrayOfSimilarArrays{T,M,N}, i::Base.ViewIndex) where {T,M,N}
166168

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...)
169169

170-
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}, i::Base.ViewIndex) where {T,M,N} =
171-
view(UnsafeArrays.unsafe_uview(A), i)
170+
UnsafeArrays.unsafe_uview(A::ArrayOfSimilarArrays{T,M,N}) where {T,M,N} =
171+
ArrayOfSimilarArrays{M}(uview(A.data), uview)
172172

173173

174174
const VectorOfSimilarArrays{

0 commit comments

Comments
 (0)