-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
BUG: sparse: raise error for array classes, document/test old behavior #20490
Merged
perimosocordiae
merged 9 commits into
scipy:main
from
ilan-gold:ig/sparse_array_singletons
May 7, 2024
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2cf32cc
(feat): raise errory for array classes, document/test old behavior
ilan-gold 58caa47
(fix): lint issues
ilan-gold dbeea6d
Apply suggestions from code review
ilan-gold dd30a29
(fix): string overrun
ilan-gold 0dfe9ea
(fix): more string overrun issues
ilan-gold 82ac354
Merge branch 'ig/sparse_array_singletons' of https://github.com/ilan-…
ilan-gold 1b846e3
Update _bsr.py
ilan-gold 46c2ae3
(refactor): check for singleton in `_spbase`
ilan-gold d160f9d
Merge branch 'main' into ig/sparse_array_singletons
perimosocordiae File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementing the suggestion from our call means that
_spbase
now needs to check the first argument which resulted in this change. Not sure if the lack of arguments in_spbase
was a choice or not, but maybe there's a way around this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... Good point about lack of arguments being a choice or not.
It looks like setting
maxprint
actually doesn't work for all the subclasses that override__init__
. So currently we can't choose a non-default maxprint value for most of the formats.That could be fixed by adding the maxprint parameter to
__init__
methods throughout. Or by adding**kwargs
parameters that get passed through to the superclass__init__
. The second option is harder to read for someone trying to figure out what all the options are.And this could be fixed in a separate PR. Let me know if you prefer that and I'll open a separate issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the
maxprint
functionality has been inaccessible for a while, unfortunately. We should clean that up in a later PR.