Skip to content

Test the NUFFT adjoint against the scale of its inner products - #169

Merged
mcencini merged 1 commit into
mainfrom
claude/project-thread-mlpb2k
Nov 3, 2026
Merged

mcencini merged 1 commit into
mainfrom
claude/project-thread-mlpb2k

Conversation

@mcencini

@mcencini mcencini commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Requested by Matteo · project thread

What changed

The four NUFFT adjoint tests in tests/test_finufft.py hold |<Ax, y> - <x, Aᴴy>| to rel · |Ax| |y| (_assert_adjoint_pair), instead of rel of the inner product itself.

Why

The v0.0.20 release run failed only on Test bartorch[cu13] on Python 3.10: test_weights_multiply_the_transform_and_their_conjugate_its_adjoint got 0.019863 against 0.019866 ± 2e-6. With random x and y the inner product can sit near zero, so a relative bound on it is a float32 lottery; the norm product is the scale the rounding error actually has. The publish jobs were skipped because of it.

Validation

scripts/lint.sh clean. Not run locally (no BART build in this session); CI runs the suite.

Documentation impact

None.


Generated by Claude Code

The adjoint tests compared <Ax, y> and <x, A^H y> relative to their own
value, which random draws can bring near zero: a cu13 Python 3.10 run of
v0.0.20 failed by 1.7e-4 relative on an inner product of 0.02. The
difference is now held to rel times |Ax| |y|.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MFB6QKwdnFNa1C1gmpXsLo
@mcencini mcencini self-assigned this Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mcencini
mcencini merged commit e461786 into main Nov 3, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants