-
Notifications
You must be signed in to change notification settings - Fork 229
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
API: Fix Sparse rebuild with explicit empty subfunctions #2473
Conversation
38ffc2c
to
c3da175
Compare
devito/types/sparse.py
Outdated
kwargs.get('interpolation_coeffs_data')) | ||
if not any(k in kwargs for k in ('coordinates', 'gridpoints', | ||
'coordinates_data', 'gridpoints_data')): | ||
print(kwargs) |
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.
leftover
devito/types/sparse.py
Outdated
def __subfunc_setup__(self, suffix, keys, dtype=None, inkwargs=False, **kwargs): | ||
key = None | ||
for k in keys: | ||
if k in kwargs: |
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.
multiple indentation levels avoidable, I think:
if k not in kwargs:
continue
elif kwargs[k] is None:
return None
else:
key = kwargs[k]
break
...
devito/types/sparse.py
Outdated
return None | ||
else: | ||
if inkwargs: | ||
# Only create the subfunction if provided. |
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.
not sure I understand what the role of this argument is, perhaps expand the comment?
c3da175
to
32f9b30
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2473 +/- ##
=======================================
Coverage 87.19% 87.20%
=======================================
Files 238 238
Lines 45185 45201 +16
Branches 4008 4012 +4
=======================================
+ Hits 39400 39418 +18
+ Misses 5104 5103 -1
+ Partials 681 680 -1 ☔ View full report in Codecov by Sentry. |
32f9b30
to
8dbe997
Compare
8dbe997
to
898dd73
Compare
No description provided.