MNT Replaced kwargs by named args for train_test_split#17216
Merged
NicolasHug merged 4 commits intoscikit-learn:masterfrom May 14, 2020
hugolmn:hugolmn-train_test_split-definition
Merged
MNT Replaced kwargs by named args for train_test_split#17216NicolasHug merged 4 commits intoscikit-learn:masterfrom hugolmn:hugolmn-train_test_split-definition
NicolasHug merged 4 commits intoscikit-learn:masterfrom
hugolmn:hugolmn-train_test_split-definition
Conversation
rth
reviewed
May 14, 2020
Member
rth
left a comment
There was a problem hiding this comment.
Thanks @hugolmn ! Looking at git blame https://github.com/scikit-learn/scikit-learn/blame/85d24b3cb5897ce4b864d9f229d8b9fcae8d5ce7/sklearn/model_selection/_split.py#L2075 I can't see any obvious reasons why it was done in such a convoluted way.
Looks good to me assuming CI passes.
rth
reviewed
May 14, 2020
Member
|
Hmm, actually key word only argument don't seem to work with first |
This reverts commit 80ad8c9.
rth
approved these changes
May 14, 2020
NicolasHug
approved these changes
May 14, 2020
Member
|
Thanks @hugolmn |
Member
|
This is amazing! I have ran into this many times when using |
gio8tisu
pushed a commit
to gio8tisu/scikit-learn
that referenced
this pull request
May 15, 2020
viclafargue
pushed a commit
to viclafargue/scikit-learn
that referenced
this pull request
Jun 26, 2020
jayzed82
pushed a commit
to jayzed82/scikit-learn
that referenced
this pull request
Oct 22, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
By using **options in the argument list, named arguments where not immediately shown when pressing shift+tab in jupyter. I replaced it by using named arguments and their default values described in the docstring.