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

Refactor: Replace interp2d with interpn #279

Merged
merged 5 commits into from
May 23, 2023

Conversation

lettlini
Copy link
Collaborator

This PR replaces all calls to interp2d with interpn.

When conducting a review, unfortunately, caution is required in some places, as not all situations are covered by unit tests.

  • Have you followed our guidelines in CONTRIBUTING.md?
  • Have you self-reviewed your code and corrected any misspellings?
  • Have you written documentation that is easy to understand?
  • Have you written descriptive commit messages?
  • Have you added NumPy docstrings for newly added functions?
  • Have you formatted your code using black?
  • If you have introduced a new functionality, have you added adequate unit tests?
  • Have all tests passed in your local clone?
  • If you have introduced a new functionality, have you added an example notebook?
  • Have you kept your pull request small and limited so that it is easy to review?
  • Have the newest changes from this branch been merged?

@lettlini lettlini requested review from freemansw1 and w-k-jones May 11, 2023 10:29
@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 21.95% and project coverage change: -0.21 ⚠️

Comparison is base (f4a3e5a) 47.41% compared to head (28eb173) 47.21%.

Additional details and impacted files
@@              Coverage Diff              @@
##           RC_v1.5.0     #279      +/-   ##
=============================================
- Coverage      47.41%   47.21%   -0.21%     
=============================================
  Files             14       14              
  Lines           2708     2728      +20     
=============================================
+ Hits            1284     1288       +4     
- Misses          1424     1440      +16     
Flag Coverage Δ
unittests 47.21% <21.95%> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tobac/utils/general.py 64.51% <21.95%> (-4.52%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lettlini lettlini requested a review from snilsn May 12, 2023 05:23
@w-k-jones w-k-jones added this to the Version 1.5 milestone May 12, 2023
Copy link
Collaborator

@snilsn snilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall @lettlini and does improve readability.

I realized that my first comment is a general question, why did you swap the coordinates?

tobac/utils/general.py Show resolved Hide resolved
tobac/utils/general.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@snilsn snilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving now after the small fix!

Copy link
Member

@w-k-jones w-k-jones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy for this to be merged. I think we can ignore the failed codecov test

Copy link
Member

@freemansw1 freemansw1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this with a fairly large dataset and got the same answers as with the original. Happy for this to be merged. Thanks, @lettlini .

@freemansw1
Copy link
Member

@lettlini are you happy for this to be merged? If so, I'll go ahead and get it in. One step closer to v1.5 release.

@freemansw1 freemansw1 linked an issue May 22, 2023 that may be closed by this pull request
@freemansw1 freemansw1 added the Refactor Code that doesn't intend to change the functionality, but instead refactor/clean up. label May 22, 2023
@lettlini
Copy link
Collaborator Author

Thanks for the reviews @snilsn @w-k-jones @freemansw1. Happy for this to be merged.

@freemansw1 freemansw1 merged commit 75cd959 into tobac-project:RC_v1.5.0 May 23, 2023
@lettlini lettlini deleted the refactor/interpn branch May 24, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Code that doesn't intend to change the functionality, but instead refactor/clean up.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scipy interp2d deprecated
4 participants