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
{{ message }}
Repository navigation
[amss] remove interpolation and replace np.interp #227
I think it would probably easier than writing a numba compatible function that replicates the figure as I did this afternoon
Thanks for doing that @HumphreyYang ! I really appreciate the effort nontheless. What you did was natural and we could pause at that and open a separate issue if you like. I'll leave it up to you.
I agree with the comments above on trying the JAX APIs. Also, the lectures here are in the advanced series so we can prefer JAX over numba even if some of the code looks complex with JAX.
Activity
mmcky commentedon Aug 6, 2025
@HumphreyYang are you familiar with these lectures?
We need to replace these
interpolationfunctions with numpy alternatives (for now). Are there any easy replacements?HumphreyYang commentedon Aug 6, 2025
Hi @mmcky, as far as I know there is no simple alternative for UCGrid for multi-dimensional interpolation in
numpy.There is one in
scipy:https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RegularGridInterpolator.html
Would you like pure
numpyimplementation?mmcky commentedon Aug 6, 2025
Thanks @HumphreyYang
Also just FYI I am doing some testing of Copilot.
I assigned it to fix this issue and here is what it is coming up with so far
#228
mmcky commentedon Aug 6, 2025
I would just need to check if this sits in
numbajit or not.HumphreyYang commentedon Aug 6, 2025
Hi @mmcky, I just had a try, no, RegularGridInterpolator is not in
numba.I think we might need to implement our own interpolator in numpy like what copilot is doing.
Let's see how it goes.
jstac commentedon Aug 6, 2025
Just noting that this is also in JAX: https://docs.jax.dev/en/latest/_autosummary/jax.scipy.interpolate.RegularGridInterpolator.html
Maybe someone could bite the bullet and just convert this whole lecture over to JAX...?
HumphreyYang commentedon Aug 6, 2025
Many thanks @jstac, I can do that!
I think it would probably easier than writing a numba compatible function that replicates the figure as I did this afternoon : )
jstac commentedon Aug 6, 2025
Thanks for doing that @HumphreyYang ! I really appreciate the effort nontheless. What you did was natural and we could pause at that and open a separate issue if you like. I'll leave it up to you.
HumphreyYang commentedon Aug 6, 2025
Many thanks, @jstac. I think this issue and PR make a really nice case study on Copilot and AI that we can share with the team.
It’s my fault for getting a bit too involved in trying to beat the AI by replicating the graph : )
I’ll leave this issue to @mmcky and start rewriting!
mmcky commentedon Aug 6, 2025
thanks @jstac I will start cross checking some of these functions with jax docs
kp992 commentedon Aug 6, 2025
I agree with the comments above on trying the JAX APIs. Also, the lectures here are in the advanced series so we can prefer JAX over numba even if some of the code looks complex with JAX.