You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For B-splines, in-place interpolation is possible. But for GriddedInterpolation, it is not.
My motivation for doing that is to make the coefs a view of a larger array which will be dynamically updated. I could copy the values from the large array to itp.coefs every time, but this is unnecessary if the in-place gridded interpolation is possible.
x =1:4
y_large = [2, 4, 6, 8, 10]
y =view(y_large, 1:4)
f1 =interpolate!(y, BSpline(Linear()))
f2 =interpolate((x,), y, Gridded(Linear()))
# f2 = interpolate!((x,), y, Gridded(Linear())) # Does not work@showf1(2.5), f2(2.5) # 5.0, 5.0
y_large .=0@showf1(2.5), f2(2.5) # 0.0, 5.0
The text was updated successfully, but these errors were encountered:
jaemolihm
changed the title
Inplace GriddedInterpolation
Inplace GriddedInterpolation is not available
Jun 23, 2022
For B-splines, in-place interpolation is possible. But for GriddedInterpolation, it is not.
My motivation for doing that is to make the
coefs
a view of a larger array which will be dynamically updated. I could copy the values from the large array toitp.coefs
every time, but this is unnecessary if the in-place gridded interpolation is possible.The text was updated successfully, but these errors were encountered: