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

API: Fix Sparse rebuild with explicit empty subfunctions #2473

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

mloubout
Copy link
Contributor

No description provided.

@mloubout mloubout added the API api (symbolics, types, ...) label Oct 25, 2024
@mloubout mloubout force-pushed the sparse-subfunc-init branch 3 times, most recently from 38ffc2c to c3da175 Compare October 25, 2024 13:56
kwargs.get('interpolation_coeffs_data'))
if not any(k in kwargs for k in ('coordinates', 'gridpoints',
'coordinates_data', 'gridpoints_data')):
print(kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover

def __subfunc_setup__(self, suffix, keys, dtype=None, inkwargs=False, **kwargs):
key = None
for k in keys:
if k in kwargs:
Copy link
Contributor

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
...

return None
else:
if inkwargs:
# Only create the subfunction if provided.
Copy link
Contributor

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?

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.20%. Comparing base (afae8af) to head (898dd73).
Report is 3 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

@mloubout mloubout merged commit b466c28 into master Oct 25, 2024
31 checks passed
@mloubout mloubout deleted the sparse-subfunc-init branch October 25, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API api (symbolics, types, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants