The Wayback Machine - https://web.archive.org/web/20220218165940/https://github.com/scikit-learn/scikit-learn/pull/19752
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

FIX StandardScaler.inverse_transform raise error when the input is a 1d array #19752

Merged

Conversation

@MaxwellLZH
Copy link
Contributor

@MaxwellLZH MaxwellLZH commented Mar 23, 2021

Reference Issues/PRs

This is a fix to issue #19518.

What does this implement/fix? Explain your changes.

Added check_array in StandardScaler.inverse_transform, and fixed failing test cases.

Copy link
Member

@ogrisel ogrisel left a comment

Thanks for the PR. Could you please add a new test in sklearn/preprocessing/tests/test_data.py that checks the new behavior only for StandardScaler in isolation?

Please also add a new entry in doc/whats_new/v1.0.rst.

@ogrisel ogrisel added this to the 1.0 milestone Mar 29, 2021
@cmarmo cmarmo added the Bug label Mar 30, 2021
Copy link
Member

@thomasjpfan thomasjpfan left a comment

Thank you for the PR @MaxwellLZH !

sklearn/compose/tests/test_target.py Outdated Show resolved Hide resolved
sklearn/preprocessing/tests/test_data.py Show resolved Hide resolved
@MaxwellLZH
Copy link
Contributor Author

@MaxwellLZH MaxwellLZH commented Jun 15, 2021

Hey guys, since the PR has been opened for a couple month, just checking if there is any other changes that I need to work on regarding this issue?

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Thank you for the ping @MaxwellLZH

I synced this PR with main and I think its ready to merge.

rth
rth approved these changes Jun 26, 2021
Copy link
Member

@rth rth left a comment

Thanks @MaxwellLZH ! One comment otherwise LGTM.

sklearn/preprocessing/tests/test_data.py Outdated Show resolved Hide resolved
@glemaitre glemaitre self-assigned this Jul 23, 2021
@glemaitre glemaitre merged commit 238451d into scikit-learn:main Jul 23, 2021
28 checks passed
@glemaitre
Copy link
Contributor

@glemaitre glemaitre commented Jul 23, 2021

Thanks @MaxwellLZH

TomDLT added a commit to TomDLT/scikit-learn that referenced this issue Jul 29, 2021
samronsin added a commit to samronsin/scikit-learn that referenced this issue Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants