Interp enforce coords#2884
Closed
mloubout wants to merge 4 commits into
Closed
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2884 +/- ##
==========================================
+ Coverage 83.43% 83.44% +0.01%
==========================================
Files 248 248
Lines 51330 51370 +40
Branches 4428 4430 +2
==========================================
+ Hits 42825 42867 +42
Misses 7750 7750
+ Partials 755 753 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @wraps(func) | ||
| def wrapper(interp, *args, **kwargs): | ||
| inputs = args + as_tuple(kwargs.get('expr', ())) | ||
| # Subfunction of the SparseFunction use to create the interpolator |
Contributor
There was a problem hiding this comment.
can use some blank lines here
| inputs = args + as_tuple(kwargs.get('expr', ())) | ||
| # Subfunction of the SparseFunction use to create the interpolator | ||
| sfunc = interp.sfunction | ||
| # Subfunctions found in the arguments of the interpolation/injection operation |
| a_sfuncs = {f for f in retrieve_functions(inputs) | ||
| if f.is_SparseFunction} - {sfunc} | ||
| if a_sfuncs: | ||
| # Check that is uses the same coordinates as the interpolator's SparseFunction |
| # Subfunctions found in the arguments of the interpolation/injection operation | ||
| a_sfuncs = {f for f in retrieve_functions(inputs) | ||
| if f.is_SparseFunction} - {sfunc} | ||
| if a_sfuncs: |
Contributor
There was a problem hiding this comment.
to avoid one nesting level, I suggest to return early and de-indent (ultra-nitpick)
Contributor
Author
|
Fine in #2883 and fixed comments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On top of #2883
Up to debate, might be problematic for existing codes that abuse it