Repository navigation
Conversation
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.
Description
Baseline2D.individual_axesfits unsorted data against sorted coordinates, so coordinate-dependent methods can return the wrong baseline:Restore each axis's original coordinate order before constructing its one-dimensional fitter. That fitter then sorts the coordinates, data and optional weights together and returns results in the caller's order. No caller arrays are modified.
On three recorded-audio spectrograms, 90 of 144 row/column/permutation/method configurations disagreed with independently chained
Baselinefits. All now match exactly, including intermediate baselines. All 36 sorted-coordinate controls retain identical output bytes. The regression covers row-only, column-only and combined permutations with exact quadratic surfaces.Validation: the full suite passes (6967 passed, 113 skipped; baseline 6955 passed with the same skips and warnings), and
ruff check .passes on Linux/Python 3.12. Other Python versions and platforms were not exercised locally.Type of Pull Request
Pull Request Checklist