From 2e9b14ca3efc78b097936e99b86ccb5ff0c5ff45 Mon Sep 17 00:00:00 2001 From: Bart de Koning Date: Sat, 3 Aug 2024 12:42:22 +0200 Subject: [PATCH] Remove user-supplied iguess option --- src/DataInterpolations.jl | 3 --- src/derivatives.jl | 3 ++- src/interpolation_methods.jl | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/DataInterpolations.jl b/src/DataInterpolations.jl index 783a796c..5f035e62 100644 --- a/src/DataInterpolations.jl +++ b/src/DataInterpolations.jl @@ -22,9 +22,6 @@ include("online.jl") include("show.jl") (interp::AbstractInterpolation)(t::Number) = _interpolate(interp, t) -function (interp::AbstractInterpolation)(t::Number, iguess::Integer) - _interpolate(interp, t; iguess) -end function (interp::AbstractInterpolation)(t::AbstractVector) u = get_u(interp.u, t) diff --git a/src/derivatives.jl b/src/derivatives.jl index 74b9f2e1..ff5b9850 100644 --- a/src/derivatives.jl +++ b/src/derivatives.jl @@ -1,5 +1,6 @@ -function derivative(A, t, order = 1; iguess = A.iguesser) +function derivative(A, t, order = 1) ((t < A.t[1] || t > A.t[end]) && !A.extrapolate) && throw(ExtrapolationError()) + iguess = A.iguesser return if order == 1 _derivative(A, t, iguess) diff --git a/src/interpolation_methods.jl b/src/interpolation_methods.jl index 94436b82..697f7375 100644 --- a/src/interpolation_methods.jl +++ b/src/interpolation_methods.jl @@ -1,7 +1,7 @@ -function _interpolate(A, t; iguess = A.iguesser) +function _interpolate(A, t) ((t < A.t[1] || t > A.t[end]) && !A.extrapolate) && throw(ExtrapolationError()) - return _interpolate(A, t, iguess) + return _interpolate(A, t, A.iguesser) end # Linear Interpolation