[go: up one dir, main page]

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

TST Extend tests for scipy.sparse/*array in sklearn/impute/tests/test_common #27277

Merged
merged 10 commits into from
Sep 15, 2023

Conversation

Charlie-XIAO
Copy link
Contributor

Towards #27090.

I made the .tocsr() change because scipy.sparse.hstack would cause the output to become coo_matrix when input is sparse array, and coo_matrix does not support slicing.

@github-actions
Copy link
github-actions bot commented Sep 3, 2023

✔️ Linting Passed

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

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

Copy link
Contributor
@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @Charlie-XIAO. Some minor comments.

sklearn/impute/tests/test_common.py Outdated Show resolved Hide resolved
sklearn/impute/tests/test_common.py Outdated Show resolved Hide resolved
Copy link
Contributor
@OmarManzoor OmarManzoor left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @Charlie-XIAO

@glemaitre glemaitre self-requested a review September 11, 2023 17:41
@Charlie-XIAO
Copy link
Contributor Author

@glemaitre I've specified the format in sp.hstack to be the same as that of X_imputer so that the behavior of sparse arrays and matrices (of the same format) should be consistent now. Do we need a changelog for this and if so, what should we say?

@glemaitre
Copy link
Member

Nice. Indeed, we need a changelog entry as well.

@glemaitre glemaitre self-requested a review September 15, 2023 19:41
Copy link
Member
@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM

doc/whats_new/v1.4.rst Outdated Show resolved Hide resolved
doc/whats_new/v1.4.rst Outdated Show resolved Hide resolved
@glemaitre glemaitre merged commit 8faa920 into scikit-learn:main Sep 15, 2023
3 of 4 checks passed
@Charlie-XIAO Charlie-XIAO deleted the tst_sp_impute_common branch September 16, 2023 02:09
REDVM pushed a commit to REDVM/scikit-learn that referenced this pull request Nov 16, 2023
…est_common` (scikit-learn#27277)

Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
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.

None yet

3 participants