@@ -104,11 +104,11 @@ Base.parent(A::ArrayOfSimilarArrays) = A.data
104
104
Base. size (A:: ArrayOfSimilarArrays{T,M,N} ) where {T,M,N} = split_tuple (size (A. data), Val {M} ())[2 ]
105
105
106
106
107
- Base. @propagate_inbounds Base. getindex (A:: ArrayOfSimilarArrays{T,M,N} , idxs:: Vararg{Any ,N} ) where {T,M,N} =
107
+ Base. @propagate_inbounds Base. getindex (A:: ArrayOfSimilarArrays{T,M,N} , idxs:: Vararg{Integer ,N} ) where {T,M,N} =
108
108
A. viewfunc (A. data, _ncolons (Val {M} ())... , idxs... )
109
109
110
110
111
- Base. @propagate_inbounds Base. setindex! (A:: ArrayOfSimilarArrays{T,M,N} , x:: AbstractArray{U,M} , idxs:: Vararg{Any ,N} ) where {T,M,N,U} =
111
+ Base. @propagate_inbounds Base. setindex! (A:: ArrayOfSimilarArrays{T,M,N} , x:: AbstractArray{U,M} , idxs:: Vararg{Integer ,N} ) where {T,M,N,U} =
112
112
setindex! (A. data, x, _ncolons (Val {M} ())... , idxs... )
113
113
114
114
@@ -177,6 +177,10 @@ VectorOfSimilarArrays(parent::AbstractArray{T,L}, viewfunc::VF = view) where {T,
177
177
@inline Base. IndexStyle (V:: VectorOfSimilarArrays ) = IndexLinear ()
178
178
179
179
180
+ Base. @propagate_inbounds Base. getindex (A:: VectorOfSimilarArrays{T,M} , rng:: Union{Colon,UnitRange{<:Integer}} ) where {T,M} =
181
+ VectorOfSimilarArrays (A. viewfunc (A. data, _ncolons (Val {M} ())... , rng), A. viewfunc)
182
+
183
+
180
184
function Base. push! (V:: VectorOfSimilarArrays{T,M} , x:: AbstractArray{U,M} ) where {T,M,U}
181
185
size (x) != Base. front (size (V. data)) && throw (DimensionMismatch (" Can't push, shape of source and elements of target is incompatible" ))
182
186
append! (V. data, x)
0 commit comments