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

Allow for a pre-built grid in LinearFast #1388

Merged
merged 3 commits into from
Mar 2, 2024

Conversation

Mv77
Copy link
Contributor

@Mv77 Mv77 commented Feb 23, 2024

The CGrid constructor of the econforge interpolation library can take a substantial time if you build many interpolators.

This PR allows you to pass a pre-constructed CGrid object to LinearFast.

This can save a lot of time in instances where you are building many interpolators over the same grid. For example, if you have consumption functions for many Markov states that are defined over the same asset grid. (cc: @wdu9 ?)

  • Tests for new functionality/models or Tests to reproduce the bug-fix in code.
  • Updated documentation of features that add new functionality.
  • Update CHANGELOG.md with major/minor changes.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 71.68%. Comparing base (649d8c6) to head (40dd7b3).

Files Patch % Lines
HARK/econforgeinterp.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1388      +/-   ##
==========================================
- Coverage   71.69%   71.68%   -0.01%     
==========================================
  Files          84       84              
  Lines       13939    13941       +2     
==========================================
+ Hits         9993     9994       +1     
- Misses       3946     3947       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mv77 Mv77 changed the title Allow for a pre-built grid Allow for a pre-built grid in LinearFast Feb 23, 2024
@alanlujan91 alanlujan91 requested a review from wdu9 February 26, 2024 14:57
@alanlujan91
Copy link
Member

This is a useful change.

However, currently interpolation.py is preventing us from moving up to python=3.12. Do you think it will be maintained and supported going forward?

@Mv77
Copy link
Contributor Author

Mv77 commented Mar 1, 2024

This is a useful change.

However, currently interpolation.py is preventing us from moving up to python=3.12. Do you think it will be maintained and supported going forward?

¯_(ツ)_/¯

@alanlujan91 alanlujan91 merged commit 0980a76 into econ-ark:master Mar 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants