-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
using Interpolations
xs = 0.5:0.1:5
A = [log(x) for x in xs]
interp_cubic = CubicSplineInterpolation(xs, A)
g = zeros(1)
Interpolations.gradient!(g,interp_cubic,1.0)
you get
julia> Interpolations.gradient!(g,interp_cubic,1.0)
1-element Vector{Float64}:
1.0001435205929399
julia> g
1-element Vector{Float64}:
1.0001435205929399
so far so good.
Then I tried
g = zeros(2)
Interpolations.gradient!(g,interp_cubic,[1.0,1.05])
and I get
julia> Interpolations.gradient!(g,interp_cubic,[1.0,1.05])
ERROR: StackOverflowError:
Stacktrace:
[1] gradient!(dest::Vector{Float64}, itp::Interpolations.Extrapolation{Float64, 1, ScaledInterpolation{Float64, 1, Interpolations.BSplineInterpolation{Float64, 1, OffsetArrays.OffsetVector{Float64, Vector{Float64}}, BSpline{Cubic{Line{OnGrid}}}, Tuple{Base.OneTo{Int64}}}, BSpline{Cubic{Line{OnGrid}}}, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}}, BSpline{Cubic{Line{OnGrid}}}, Throw{Nothing}}, x::Vector{Float64}) (repeats 79984 times)
@ Interpolations ~/.julia/packages/Interpolations/QLbbu/src/Interpolations.jl:423
any chance this is a bug?
mkitti
Metadata
Metadata
Assignees
Labels
No labels