Skip to content

Fix _shorth_center window span to match exact m-sample slices - #110

Merged
KasparP merged 1 commit into
devfrom
fix-shorth-window
Dec 3, 2026
Merged

KasparP merged 1 commit into
devfrom
fix-shorth-window

Conversation

@KasparP

@KasparP KasparP commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Fixes _shorth_center in solver_baseline.py (flagged during review of release PR #109) so the width calculation s[m - 1 :] - s[: n - m + 1] scores exact m-element windows s[idx : idx + m] and includes the final m-element window s[n - m : n].

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the window-boundary correction.

No open issues 🎉

What changed in this PR

Corrects _shorth_center in the raster baseline solver so window widths match the exact samples used to calculate the center.

Changes:

  • Scores exact m-sample windows, including the final window.
  • Adds regression coverage for window sizing and final-window selection.
File Description
tests/​raster/​test_raster_variance_interp.py Adds regression cases for exact and final windows.
src/​giant_python/​extraction/​raster/​solver_baseline.py Corrects window-width slice boundaries.

Review effort: Balanced

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