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

BUG: sparse: Fix summing duplicates for CSR/CSC creation from (data,coords) #20687

Merged
merged 2 commits into from May 15, 2024

Conversation

dschult
Copy link
Contributor

@dschult dschult commented May 10, 2024

Fixes #20670

CSC and CSR __init__ with arg1=(data, coords) input no longer checked for and summed duplicates after #19962.
This PR adds tests for this case in the constructors and also for COO.tocsc() and COO.tocsr() which use much of the same code. This does not affect the setdiag code path due to the lack of a way to introduce duplicates there -- though setdiag uses some of the same code.

@github-actions github-actions bot added scipy.sparse defect A clear bug or issue that prevents SciPy from being installed or used as expected labels May 10, 2024
@tylerjereddy tylerjereddy added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label May 11, 2024
scipy/sparse/_compressed.py Outdated Show resolved Hide resolved
scipy/sparse/_compressed.py Outdated Show resolved Hide resolved
@perimosocordiae perimosocordiae merged commit 8ce393f into scipy:main May 15, 2024
13 of 31 checks passed
@perimosocordiae
Copy link
Member

Thanks, merged!

@tylerjereddy tylerjereddy added this to the 1.13.1 milestone May 15, 2024
tylerjereddy pushed a commit to tylerjereddy/scipy that referenced this pull request May 15, 2024
…oords) (scipy#20687)

* test and then fix duplicates for CSR/CSC creation from (data,coords)

* remove has_canonical_format check when summing duplicates.
@tylerjereddy tylerjereddy removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.sparse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: sparse matrix creation in 1.13 with indices not summing entries any more
3 participants