Skip to content

Use np.interp instead of interpolation.interp - #156

Merged
mmcky merged 5 commits into
mainfrom
interp_fixes
Apr 29, 2024
Merged

mmcky merged 5 commits into
mainfrom
interp_fixes

Conversation

@kp992

@kp992 kp992 commented Mar 6, 2024 •

Copy link
Copy Markdown
Collaborator

This PR replaces all the occurences of interpolation.interp to np.interp now that numba supports np.interp directly.

@kp992
kp992 requested review from jstac and mmcky March 6, 2024 04:11
@jstac

jstac commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

@mmcky and @HumphreyYang , could you please do a first round review of this?

The aim is that swapping to NumPy's interp does not change results or degrade performance.

@jstac

jstac commented Mar 6, 2024

Copy link
Copy Markdown
Contributor

Note that this is related to QuantEcon/lecture-python.myst#387

Comment thread lectures/BCG_incomplete_mkts.md Resolved
Comment thread lectures/BCG_incomplete_mkts.md Resolved
Comment thread lectures/coase.md Resolved
Comment thread lectures/lucas_model.md Resolved
@mmcky

mmcky commented Mar 8, 2024

Copy link
Copy Markdown
Contributor

Thanks @kp992.

The last dependency on interpolations is in amss

lectures/amss.md:from interpolation.splines import eval_linear, UCGrid, nodes

@kp992 any scope to be able to remove interpolations as a dependency -- otherwise maybe we need to solve EconForge/interpolation.py#110 re: generated_jit to make use of this package in amss

@kp992

kp992 commented Mar 9, 2024

Copy link
Copy Markdown
Collaborator Author

Thanks for the review @mmcky.

The last dependency on interpolations is in amss

Yeah, I checked that. Its the only one left with interpolation.py.

@kp992 any scope to be able to remove interpolations as a dependency -- otherwise maybe we need to solve EconForge/interpolation.py#110 re: generated_jit to make use of this package in amss

Hmm, I will check with some scipy functions and if possible remove it in a follow-up PR.

@github-actions
github-actions Bot temporarily deployed to commit March 9, 2024 05:06 Inactive
@mmcky

mmcky commented Mar 11, 2024 •

Copy link
Copy Markdown
Contributor

@kp992 the lecture opt_tax_recur is failing due to issues with the nelder_mead function from quantecon. I am not sure why this is now failing as we haven't upgraded numba in this PR.

@github-actions
github-actions Bot temporarily deployed to commit March 12, 2024 02:11 Inactive
@kp992

kp992 commented Mar 12, 2024

Copy link
Copy Markdown
Collaborator Author

@mmcky Thanks for pointing out the issue. The CI is green.

@mmcky

mmcky commented Mar 12, 2024

Copy link
Copy Markdown
Contributor

thanks @kp992

Just documenting this is now the only use case of interpolations left

lectures/amss.md:from interpolation.splines import eval_linear, UCGrid, nodes

@mmcky
mmcky merged commit 03196de into main Apr 29, 2024

This branch was previously deployed

1 inactive deployment
commit — 794a3763 Deployed Mar 12, 2024 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants