I have a function f(z,k)
where I am trying to interpolate along k. Both z
and k
may be non-uniform. I do not want any interpolation along z. I am using Interpolations.jl
and trying out the following:
julia> interpolate((1:2:9, 1:5), ones(5,5), (NoInterp(), Gridded(Linear())))
ERROR: for NoInterp knot vector should be Base.OneTo(5), got 1:2:9
I’m not sure what’s going on here, is it not possible to specify nodes alongside NoInterp()
? This works as expected using any other interpolation specifier, eg.
julia> interpolate((1:2:9, 1:5), ones(5,5), (Gridded(Constant()), Gridded(Linear())))
5×5 interpolate((1:2:9,1:5), ::Array{Float64,2}, (Gridded(Constant()), Gridded(Linear()))) with element type Float64:
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0
1.0 1.0 1.0 1.0 1.0