8000 MAINT: sparse: change coo_matrix.indices to coo_matrix.coords by dschult · Pull Request #20003 · scipy/scipy · GitHub
[go: up one dir, main page]

Skip to content

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

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

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

dschult
Copy link
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
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
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
0