Skip to content

MAINT: sparse: change coo_matrix.indices to coo_matrix.coords#20003

Merged
perimosocordiae merged 2 commits intoscipy:mainfrom
dschult:coo_coords
Feb 5, 2024
Merged

MAINT: sparse: change coo_matrix.indices to coo_matrix.coords#20003
perimosocordiae merged 2 commits intoscipy:mainfrom
dschult:coo_coords

Conversation

@dschult
Copy link
Copy Markdown
Contributor

@dschult dschult commented Feb 1, 2024

To avoid confusion between formats, the recently implemented attribute name indices for COO format is changed in this PR to coords.

This is a public attribute, but did not exist in 1.12, so merging this before 1.13 will not have any backward compatibility issues.

The CSR/CSC formats already use the attribute name indices. So while the word indices is fine for COO, it may cause confusion between compressed and COO especially when working with both, converting etc. The name coords is arguably better anyway because it matches the "COO" of the COO format name. Both words seem to mean the same thing in English.

@github-actions github-actions bot added scipy.sparse maintenance Items related to regular maintenance tasks labels Feb 1, 2024
Copy link
Copy Markdown
Member

@perimosocordiae perimosocordiae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except for a few documentation issues where we want to use the full word instead of referring to the variable name.

@dschult
Copy link
Copy Markdown
Contributor Author

dschult commented Feb 3, 2024

Good catch -- I didn't think enough about docs and comments. But I suspect that its better that you make those calls anyway. I've made those changes.

@perimosocordiae perimosocordiae merged commit f6543ae into scipy:main Feb 5, 2024
@j-bowhay j-bowhay added this to the 1.13.0 milestone Feb 5, 2024
@dschult dschult deleted the coo_coords branch July 28, 2024 10:19
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.

3 participants