Skip to content

Commit aca8330

Browse files
Update src/vector_of_array.jl
1 parent c933e3a commit aca8330

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vector_of_array.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,5 +549,7 @@ function Base.lastindex(A::AbstractVectorOfArray, i=1)
549549
i == 1 && return length(A)
550550
len1 = lastindex(A[1], i-1)
551551
all(x->isequal(lastindex(x, i-1), len1), A) && return len1
552-
throw(ArgumentError("Can not get lastindex of an AbstractVectorOfArray for dimensions other than 1"))
552+
throw(ArgumentError("`end` is not defined for AbstractVectorOfArray types when the arrays have different sizes. Either enforce that the arrays are all similarly sized or directly define the index value.
553+
554+
Note that a common reason for this error in the SciMLSolution context comes from adaptively sized models. Using arguments like `saveat` can enforce that an ensemble of solutions are all saved at the same time points and thus all have the same size. Similarly, if an ODE is solved with adaptivity in the size of the system (such as for adaptive grids) then this error can refer to the changing size of the ODE through the time series."))
553555
end

0 commit comments

Comments
 (0)