Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use np.interp instead of interpolation.interp #156

Merged
merged 5 commits into from
Apr 29, 2024
Merged

Use np.interp instead of interpolation.interp #156

merged 5 commits into from
Apr 29, 2024

Conversation

kp992
Copy link
Collaborator

@kp992 kp992 commented Mar 6, 2024

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

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

jstac commented Mar 6, 2024

@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
Copy link
Contributor

jstac commented Mar 6, 2024

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

lectures/coase.md Outdated Show resolved Hide resolved
lectures/lucas_model.md Outdated Show resolved Hide resolved
@mmcky
Copy link
Contributor

mmcky commented Mar 8, 2024

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
Copy link
Collaborator Author

kp992 commented Mar 9, 2024

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
Copy link
Contributor

mmcky commented Mar 11, 2024

@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
Copy link
Collaborator Author

kp992 commented Mar 12, 2024

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

@mmcky
Copy link
Contributor

mmcky commented Mar 12, 2024

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
6 checks passed
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.

None yet

3 participants