8000 TST Extend tests for `scipy.sparse.*array` in `sklearn/covariance/tests/test_graphical_lasso.py` by KartikeyBartwal · Pull Request #27494 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

TST Extend tests for scipy.sparse.*array in sklearn/covariance/tests/test_graphical_lasso.py #27494

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

Closed
wants to merge 1 commit into from

Conversation

KartikeyBartwal
Copy link

Reference Issues/PRs

Towards #27090

Any other comments?

Loving the contribution tasks. This improvement in just one pull request is quite satisfying :)
Interested in further contributions 🙌

@github-actions
Copy link

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: a55b58b. Link to the linter CI: here

@Tialo
Copy link
Contributor
Tialo commented Sep 28, 2023

You should only add CSR_CONTAINERS parameterisation where scipy.sparse.csr_matrix is already used

@KartikeyBartwal
Copy link
Author

But its not being used anywhere directly in the file. Other than that it appears quite beneficial to switch all the dense matrices here to sparse matrices. Please let me know what are your thoughts.

@Tialo
Copy link
Contributor
Tialo commented Sep 29, 2023

There were files where sparse matrices were not used at all, as I recall you should simply leave them as they are. But in your case you can parameterise function make_sparse_spd_matrix, because after recent PR it can return sparse matrices. Honestly, But I am not sure if it's necessary, you better ask maintainers, it's up to them. If it's not there is no parameterisation to be added in this file.

Should make_sparse_spd_matrix be parameterised to return sparse and dense matrices in this file? @glemaitre

@KartikeyBartwal
Copy link
Author

I'll be patiently waiting for a response. Till then I'll focus on another issue and leave this PR open.

@glemaitre glemaitre self-requested a review September 29, 2023 20:36
@glemaitre
Copy link
Member

Should make_sparse_spd_matrix be parameterised to return sparse and dense matrices in this file?

We merge a change not long time ago that allow to return a sparse matrix. But here, all tests are not interesting about the sparse format of the input but rather the sparsity of the array itself.

Since that there is no call to scipy.sparse.csr_matrix (or coo, csc), then there is no need for changes in this file.

I am closing this PR and note this is file as done in the issue tracker. Thanks @KartikeyBartwal for investigating.

@KartikeyBartwal
Copy link
Author
KartikeyBartwal commented Sep 30, 2023

frankly, I was expecting this to be my first PR to get merged. Had been working on this file for over 2 weeks. No problem ! Let's work on another assigned file 🙌

@KartikeyBartwal KartikeyBartwal deleted the next branch September 30, 2023 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0