Skip to content

Fix error with data ownership in cholesky#288

Merged
dswah merged 1 commit into
dswah:mainfrom
craymichael:patch-2
Dec 8, 2025
Merged

Fix error with data ownership in cholesky#288
dswah merged 1 commit into
dswah:mainfrom
craymichael:patch-2

Conversation

@craymichael

Copy link
Copy Markdown
Contributor

Require that the fill-reducing permutation P of Cholesky factorizer owns its data before use. Fixes #271

This sets the OWNDATA flag of its data to True - in traceback it can be seen that col (line 102 of scipy/sparse/_index.py), which is derived from p, has this flag set to false. This creates a copy of the data if necessary (which apparently it wasn't in previous versions?)

Someone should give this patch a shot on their machine as well.

Require that the fill-reducing permutation P of Cholesky factorizer owns its data before use. Fixes dswah#271
@codecov

codecov Bot commented Jan 9, 2021

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.25%. Comparing base (b57b4cf) to head (5e3f2e1).
⚠️ Report is 56 commits behind head on main.

Files with missing lines Patch % Lines
pygam/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
+ Coverage   95.21%   95.25%   +0.03%     
==========================================
  Files          22       22              
  Lines        3178     3223      +45     
==========================================
+ Hits         3026     3070      +44     
- Misses        152      153       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@1tux 1tux 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.

this is amazing and saved my life!
I have to say that this Cholesky thing doesn't even improve running time.

@dswah dswah merged commit 96b51e6 into dswah:main Dec 8, 2025
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.

LogisticGAM and LinearGAM .fit() throws ValueError: cannot set WRITEABLE flag to True of this array

3 participants