Skip to content

Commit b5a66f0

Browse files
Update src/vector_of_array.jl
1 parent 8b02fa6 commit b5a66f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vector_of_array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractVectorOfArray{T, N},
7878
@assert length(J) == ndims(A.u[1])+1-ndims(I)
7979
@assert size(I) == size(A)[1:ndims(A)-length(J)]
8080
vecs = vec.(A.u)
81-
return Base.getindex(Adapt.adapt(__parameterless_type(T),reshape(reduce(hcat,vecs),size(A.u[1])...,length(A.u))), I, J...)
81+
return Adapt.adapt(__parameterless_type(T),reshape(reduce(hcat,vecs[I]),size(A.u[1])...,length(A.u)))
8282
end
8383

8484
Base.@propagate_inbounds Base.getindex(A::AbstractDiffEqArray{T, N}, i::Int,::Colon) where {T, N} = [A.u[j][i] for j in 1:length(A)]

0 commit comments

Comments
 (0)