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
[interpolation] Package is outdated and cannot install #223
Traceback (most recent call last):
File "<python-input-0>", line 4, in <module>
from interpolation.splines import eval_linear, UCGrid, nodes
File "/Users/mmcky/anaconda3/envs/qe/lib/python3.13/site-packages/interpolation/splines/__init__.py", line 3, in <module>
from .eval_splines import options, eval_linear, eval_cubic, eval_spline
File "/Users/mmcky/anaconda3/envs/qe/lib/python3.13/site-packages/interpolation/splines/eval_splines.py", line 6, in <module>
from .codegen import get_code_spline, source_to_function
File "/Users/mmcky/anaconda3/envs/qe/lib/python3.13/site-packages/interpolation/splines/codegen.py", line 1, in <module>
from .. import tempita
File "/Users/mmcky/anaconda3/envs/qe/lib/python3.13/site-packages/interpolation/tempita/__init__.py", line 34, in <module>
import cgi
ModuleNotFoundError: No module named 'cgi'
to install the the latest environment.
We have previously discussed reducing our dependencies and moving some of this functionality into quantecon.py
@mmcky The interpolation was used mainly because it provides numba jitted linear interpolation. That is now also provided by np.interp, in the sense that numba can compile this function.
A first step is to find all instances where interpolation` is used for one-dimensional linear interpolation and replace them with np.interp.
A second option is to rewrite the given lecture using JAX.
Activity
jstac commentedon Aug 6, 2025
@mmcky The
interpolationwas used mainly because it provides numba jitted linear interpolation. That is now also provided bynp.interp, in the sense that numba can compile this function.A first step is to find all instances where interpolation` is used for one-dimensional linear interpolation and replace them with np.interp.
A second option is to rewrite the given lecture using JAX.
mmcky commentedon Aug 6, 2025
Thanks @jstac
Step 1:
interpolationand replace withnp.interp(as compatible with numba jit)Step 2:
jaxlibrary