Closed ToshiyukiBandai closed 4 months ago
Interpolator1D
generally assumes that the values being interpolated are fixed, and hence it precomputes the slopes needed for interpolation. If you update f
, it will still use the old slopes which is wrong.
I think what you want is interpax.interp1d
which is basically a functional interface like what you describe (under the hood Interpolator1D.__call__
is just calling interp1d
with some cached values).
Thank you! I will test it and get back to you.
@f0uriest Yes, it worked well. Thank you so much!
Hi @f0uriest Thank you so much for sharing this amazing library! It makes my life easier. I have a question regarding jit compilation of the interpolated function (generated by
Interpolator1D
for example). In my problem, I want to update the coefficient of the interpolation function by a model surgery using equinox:The thing is this 'interpolated_fun' is embedded in a large training step. If I updated the interpolation function in this way, the updated is not reflected expectedly, and I would have to redefine the whole training step, which is not an option. Do you have any suggestions for this time of thing? What I am thinking is to just implement the interpolated function as a normal function and treat the coefficients as an argument for the function.