We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b02fa6 commit b5a66f0Copy full SHA for b5a66f0
src/vector_of_array.jl
@@ -78,7 +78,7 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractVectorOfArray{T, N},
78
@assert length(J) == ndims(A.u[1])+1-ndims(I)
79
@assert size(I) == size(A)[1:ndims(A)-length(J)]
80
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...)
+ return Adapt.adapt(__parameterless_type(T),reshape(reduce(hcat,vecs[I]),size(A.u[1])...,length(A.u)))
82
end
83
84
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