Repository navigation
Scale the DLR round-trip tolerance in the axis test by its conditioning - #92
Merged
Merged
Conversation
The axis test compares the same logical data with the coefficient axis in two places. The transform applies the same linear map either way, but the contraction geometry differs, so the two results differ by one rounding unit amplified by the transform's own condition number. The sampling transforms are well conditioned and keep the fixed 1e-12 bound; the DLR round trip is not (cond ~ 2.2e5 for the fixture here), and a library built from sparse-ir-rs main misses that bound by 2%. SpM-lab/sparse-ir-rs#326. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Companion to SpM-lab/sparse-ir-rs#326.
test_axis_on_three_dimensional_inputcompares the same logical data with thecoefficient axis in two places. The transform applies the same linear map either
way, but the contraction geometry can differ, so the two results differ by their
rounding amplified by the transform's conditioning. The three sampling
transforms are well conditioned and keep the fixed
1e-12bound; the DLR roundtrip is not (
cond(-S_l V_l(w_p))is ~2.2e5 for the fixture here), and a librarybuilt from
sparse-ir-rsmainmisses that bound by 2% (absolute 3.24e-12against atol 3.19e-12).
The tolerance is now derived from the fixture's own conditioning rather than
hard-coded:
Test only: no runtime code changes, and nothing to release.
Verified:
pytest tests/test_boundary.py -k axis_on_three-> 8 passed, both against thepublished
pylibsparseir 0.10.0wheel and against a library built fromsparse-ir-rsmain(4 failed before).check_libsparseir_version_consistency.py-> all checks passed.