Skip to content

[interpolation] Package is outdated and cannot install #223

Open

Description

@mmcky

The interpolation package needs to be updated

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

Activity

  1. jstac commented on Aug 6, 2025

    @jstac
    Contributor

    @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.

  2. mmcky commented on Aug 6, 2025

    @mmcky
    ContributorAuthor

    Thanks @jstac

    Step 1:

    • remove dependency on interpolation and replace with np.interp (as compatible with numba jit)

    Step 2:

    • update lecture to use the jax library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions