I want to use scaled linear interpolation using BSplines with a 4-D matrix. One of the dimensions does not have all points equally spaced but is a 2 ranges put together. I read that BSplines are much faster than Gridded interpolations and was wondering if I could use BSplines here somehow. Just giving a small example similar to my case here.
using Interpolations;
d1=range(1.,stop=2.,length=11);
d2 = [range(1.,stop=1.4,length=5); range(1.5,stop=2.,length=3);];
A = [log(x1+x2) for x1 in d1,x2 in d2];
itp = interpolate(A, BSpline(Linear()));
sitp = scale(itp, d1, d2);
If I do this I get the error
ERROR: MethodError: no method matching scale(::Interpolations.BSplineInterpolation{Float64,2,Array{Float64,2},BSpline{Linear},Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}}, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Float64,1})
Closest candidates are:
scale(::AbstractInterpolation{T,N,IT}, ::AbstractRange...) where {T, N, IT} at C:\Users\hayag\.julia\packages\Interpolations\AiRSM\src\scaling\scaling.jl:23
Stacktrace:
[1] top-level scope at none:0
Is there a workaround for this?