Skip to content

Interp enforce coords#2884

Closed
mloubout wants to merge 4 commits into
mainfrom
interp-enforce-coords
Closed

Interp enforce coords#2884
mloubout wants to merge 4 commits into
mainfrom
interp-enforce-coords

Conversation

@mloubout

Copy link
Copy Markdown
Contributor

On top of #2883

Up to debate, might be problematic for existing codes that abuse it

@mloubout mloubout added the API api (symbolics, types, ...) label Apr 14, 2026
@codecov

codecov Bot commented Apr 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.44%. Comparing base (2413d19) to head (19abed3).

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     
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 68.81% <60.97%> (+<0.01%) ⬆️
pytest-gpu-gcc- 78.04% <96.15%> (+0.03%) ⬆️
pytest-gpu-icx- 77.66% <96.15%> (+0.01%) ⬆️
pytest-gpu-nvc-nvidiaX 69.33% <60.97%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wraps(func)
def wrapper(interp, *args, **kwargs):
inputs = args + as_tuple(kwargs.get('expr', ()))
# Subfunction of the SparseFunction use to create the interpolator

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

SubFunctions

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo

# 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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

to avoid one nesting level, I suggest to return early and de-indent (ultra-nitpick)

@mloubout

Copy link
Copy Markdown
Contributor Author

Fine in #2883 and fixed comments

@mloubout mloubout closed this Apr 14, 2026
@mloubout mloubout deleted the interp-enforce-coords branch April 14, 2026 19:59
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