Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: sparse: fix __init__ func sig to allow maxprint to be set #20719

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

dschult
Copy link
Contributor

@dschult dschult commented May 16, 2024

arg maxprint in _spbase.__init__() doesn't appear in subclasses so setting maxprint during construction is not possible. See #20490

This PR adds tests of setting maxprint, and tests that the new __str__ format works with maxprint set. Fixes __init__ function signatures to work with maxprint being set.

I set up maxprint to be a keyword-only parameter so it doesn't disrupt the positional parameters for subclasses (in e.g. BSR where number of position-keyword parameters is one more than the other subclasses).

@github-actions github-actions bot added scipy.sparse maintenance Items related to regular maintenance tasks labels May 16, 2024
@lucascolley lucascolley changed the title MAINT: sparse: fix init func sig to allow maxprint to be set MAINT: sparse: fix __init__ func sig to allow maxprint to be set Jun 2, 2024
@lucascolley lucascolley added this to the 1.15.0 milestone Jun 3, 2024
@perimosocordiae
Copy link
Member

CI failure is unrelated. Merging.

@perimosocordiae perimosocordiae merged commit 162a176 into scipy:main Jun 3, 2024
29 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.sparse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants