Skip to content

Tiny fix for a typo in base.py: missing_names -> unexpected_names #23091

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 1 commit into from
Apr 9, 2022

Conversation

avm19
Copy link
Contributor

@avm19 avm19 commented Apr 9, 2022

Reference Issues/PRs

No issue. A small correction to #18010
See a discussion in #18010 (review)

What does this implement/fix? Explain your changes.

A quick fix for a typo in base.py:

-            if not missing_names and not missing_names:
+            if not missing_names and not unexpected_names:
                message += (
                    "Feature names must be in the same order as they were in fit.\n"
                )

Any other comments?

I hope I can get away without writing a test or creating an issue.

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

I am okay with no regression test here since this only touches the warning message itself. In this case, this PR is removing a part of the message when not unexpected_names is true.

@jeremiedbb jeremiedbb merged commit 7190f2c into scikit-learn:main Apr 9, 2022
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants