Closed fatteneder closed 1 year ago
using Interpolations x = 1:4 y = view(rand(4), :) itp = interpolate!((x,), y, Gridded(Linear())) y .= 0 @show itp(2.5)
Taken from here: https://juliamath.github.io/Interpolations.jl/stable/control/
The above gives
julia> include("mwe.jl") ERROR: LoadError: MethodError: no method matching interpolate!(::Type{Float64}, ::Type{Float64}, ::Tuple{UnitRange{Int64}}, ::SubArray{Float64, 1, Vector{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true}, ::Gridded{Linear{Throw{OnGrid}}}) Closest candidates are: interpolate!(::Type{TWeights}, ::Any, ::IT, ::GT) where {TWeights, IT<:Union{NoInterp, Tuple{Vararg{Union{NoInterp, BSpline}}}, BSpline}, GT<:Union{NoInterp, Tuple{Vararg{Union{NoInterp, Interpolations.GridType}}}, Interpolations.GridType}} at ~/.julia/packages/Interpolations/y4lLj/src/deprecations.jl:25 interpolate!(::Type{TWeights}, ::AbstractArray, ::IT) where {TWeights, IT<:Union{NoInterp, Tuple{Vararg{Union{NoInterp, BSpline}}}, BSpline}} at ~/.julia/packages/Interpolations/y4lLj/src/b-splines/b-splines.jl:227 interpolate!(::Type{TWeights}, ::AbstractArray, ::IT, ::Real, ::Int64) where {TWeights, IT<:Union{NoInterp, Tuple{Vararg{Union{NoInterp, BSpline}}}, BSpline}} at ~/.julia/packages/Interpolations/y4lLj/src/b-splines/b-splines.jl:237 ... Stacktrace: [1] interpolate!(knots::Tuple{UnitRange{Int64}}, A::SubArray{Float64, 1, Vector{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true}, it::Gridded{Linear{Throw{OnGrid}}}) @ Interpolations ~/.julia/packages/Interpolations/y4lLj/src/gridded/gridded.jl:172 ...
Nevermind, my Interpolations.jl was stuck at v0.13.6. Updating to v0.14.6 fixed it ...
Interpolations.jl
v0.13.6
v0.14.6
MWE
Taken from here: https://juliamath.github.io/Interpolations.jl/stable/control/
The above gives