diff --git a/src/integrals.jl b/src/integrals.jl index 0e796d4d..e932bc5b 100644 --- a/src/integrals.jl +++ b/src/integrals.jl @@ -14,7 +14,7 @@ function integral(A::AbstractInterpolation, t1::Number, t2::Number) if A.t[idx2] == t2 idx2 -= 1 end - total = zero(eltype(A)) + total = zero(eltype(A.u)) for idx in idx1:idx2 lt1 = idx == idx1 ? t1 : A.t[idx] lt2 = idx == idx2 ? t2 : A.t[idx + 1] diff --git a/src/interpolation_methods.jl b/src/interpolation_methods.jl index 334ce030..e00adc59 100644 --- a/src/interpolation_methods.jl +++ b/src/interpolation_methods.jl @@ -8,7 +8,7 @@ end function _interpolate(A::LinearInterpolation{<:AbstractVector}, t::Number, iguess) if isnan(t) # For correct derivative with NaN - idx = firstindex(A) - 1 + idx = firstindex(A.u) - 1 t1 = t2 = one(eltype(A.t)) u1 = u2 = one(eltype(A.u)) else