-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
added econforge interpolation into LinearInterp and scipy interpolati… #1136
Conversation
…on into CubicInterp
…oved cubic spline interpolation until tolerance issues are resolved
I temporarily removed scipy CubicInterp, since it does have minor tolerance value changes, which causes errors in the unit test. I tested scipy CubicHermiteSpline, which resulted in larger tolerance issues than CubicInterp. I removed this to at least get the base LinearInterp changes implemented. I added a try catch around the econforge linear interpolation test, since this will capture the error and should not increase runtimes. If this approach is not desirable, we can try and think of cleaner ways to do this. |
I'm interested in this and would be happy to review it after @alanlujan91 is done. |
@gms158 because EconForge uses numba and numba is for speeding up array arithmetic, I wonder if the error is simply because the test is using ints and not arrays https://github.com/econ-ark/HARK/runs/6178262613?check_suite_focus=true#step:5:558 Maybe Bilinear and Trilinear should check the type first and if inputs are ints then they should be cast as arrays? |
Alan-
yes, I was going to look into this more tomorrow. I may or will follow
up with a question or two for you tomorrow.
-Gry
…On Tue, Apr 26, 2022 at 6:51 PM alanlujan91 ***@***.***> wrote:
@gms158 <https://github.com/gms158> because EconForge uses numba and
numba is for speeding up array arithmetic, I wonder if the error is simply
because the test is using ints and not arrays
https://github.com/econ-ark/HARK/runs/6178262613?check_suite_focus=true#step:5:558
Maybe Bilinear and Trilinear should check the type first and if inputs are
ints then they should be cast as arrays?
—
Reply to this email directly, view it on GitHub
<#1136 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOLRJ322WCGPXXUJ4KWX6DVHBXQRANCNFSM5TY4DOBQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I'm currently offline but if you want I can help review this PR next week
Le mer. 27 avr. 2022 à 04:49, gms158 ***@***.***> a écrit :
… Alan-
yes, I was going to look into this more tomorrow. I may or will follow
up with a question or two for you tomorrow.
-Gry
On Tue, Apr 26, 2022 at 6:51 PM alanlujan91 ***@***.***>
wrote:
> @gms158 <https://github.com/gms158> because EconForge uses numba and
> numba is for speeding up array arithmetic, I wonder if the error is
simply
> because the test is using ints and not arrays
>
>
>
https://github.com/econ-ark/HARK/runs/6178262613?check_suite_focus=true#step:5:558
>
> Maybe Bilinear and Trilinear should check the type first and if inputs
are
> ints then they should be cast as arrays?
>
> —
> Reply to this email directly, view it on GitHub
> <#1136 (comment)>, or
> unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAOLRJ322WCGPXXUJ4KWX6DVHBXQRANCNFSM5TY4DOBQ
>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#1136 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACDSKPX4A5R25GYHCW5V3LVHCTLRANCNFSM5TY4DOBQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
… account for an outlier case where x and y test values are one point with integers which causes an error in the expected data format for python 3.8 and up
I updated the interpolation code to account for infrequent and outlier cases where the econ forge library fails when evaluating one point consisting of integers, for python 3.8 and higher. |
@albop @AMonninger did you want to review / have any comments on this before we merge it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes I have reviewed it's good to merge.
@alanlujan91, do you know any reason we should not merge this? |
No, I was just giving others a chance to comment but it passes all tests so we can merge it |
Please add an update to the CHANGELOG describing this feature to the PR https://github.com/econ-ark/HARK/blob/master/Documentation/CHANGELOG.md |
This PR needs documentation according to the NumPy / SciPy standard: |
Superceded by #1151 |
…on into CubicInterp
Please ensure your pull request adheres to the following guidelines: