Skip to content

bugfix/meijer-g-indexing#158

Merged
RotemKalisch merged 1 commit intomasterfrom
bugfix/meijer-g-indexing
Apr 5, 2026
Merged

bugfix/meijer-g-indexing#158
RotemKalisch merged 1 commit intomasterfrom
bugfix/meijer-g-indexing

Conversation

@RotemKalisch
Copy link
Copy Markdown
Member

Fix m and n index bug in Meijer G, and add a regression test for the bug.
Autoformatter changed some pickle code around, but it's the same code.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an off-by-one indexing bug in the Meijer G CMF matrix construction so that the sign changes at the correct boundary indices n (for a_i) and m (for b_j), and adds a regression test to prevent reintroducing the issue.

Changes:

  • Corrected Meijer G sign logic from index > n/m to index >= n/m in construct_matrix.
  • Added a regression test (test_m_n_sign) covering the boundary case where index == n / index == m.
  • Applied formatting-only updates to MeijerG pickling state handling and related test assertions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ramanujantools/cmf/meijer_g.py Fixes boundary indexing for m/n when determining the sign in construct_matrix.
ramanujantools/cmf/meijer_g_test.py Adds a regression test for the m/n boundary sign bug; formatting-only adjustments in serialization assertions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RotemKalisch RotemKalisch merged commit c6e870e into master Apr 5, 2026
6 checks passed
@RotemKalisch RotemKalisch deleted the bugfix/meijer-g-indexing branch April 5, 2026 19:36
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