Skip to content

Remove numpy/scipy monkey-patches, bump pygam>=0.9#1289

Merged
Marius1311 merged 1 commit intomainfrom
modernize/remove-monkey-patches
Feb 20, 2026
Merged

Remove numpy/scipy monkey-patches, bump pygam>=0.9#1289
Marius1311 merged 1 commit intomainfrom
modernize/remove-monkey-patches

Conversation

@Marius1311
Copy link
Copy Markdown
Collaborator

The monkey-patches in init.py were workarounds for pygam < 0.9:

  • sp.spmatrix.A: pygam used .A (deprecated scipy alias for .toarray())
  • np.int = int: pygam used np.int (removed in numpy 2.0)

Both are fixed in pygam >= 0.9. Remove the patches and bump the lower bound from 0.8 to 0.9.

IMPORTANT: Please search among the Pull requests before creating one.

Description

How has this been tested?

Closes

@Marius1311 Marius1311 force-pushed the modernize/remove-monkey-patches branch from 94fee97 to 01dd08a Compare February 20, 2026 20:20
The monkey-patches in __init__.py were workarounds for pygam < 0.9:
- sp.spmatrix.A: pygam used .A (deprecated scipy alias for .toarray())
- np.int = int: pygam used np.int (removed in numpy 2.0)

Both are fixed in pygam >= 0.9. Remove the patches and bump the
lower bound from 0.8 to 0.9.
@Marius1311 Marius1311 force-pushed the modernize/remove-monkey-patches branch from 01dd08a to 35d381a Compare February 20, 2026 20:33
@Marius1311 Marius1311 merged commit 5913811 into main Feb 20, 2026
6 of 7 checks passed
@Marius1311 Marius1311 deleted the modernize/remove-monkey-patches branch February 20, 2026 20:44
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.44%. Comparing base (128c05b) to head (35d381a).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1289   +/-   ##
=======================================
  Coverage   79.44%   79.44%           
=======================================
  Files          51       51           
  Lines        8639     8639           
  Branches     1493     1493           
=======================================
  Hits         6863     6863           
  Misses       1196     1196           
  Partials      580      580           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant