8000 DOC Ensures that train_test_split passes numpydoc validation by arisayosh · Pull Request #21435 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Ensures that train_test_split passes numpydoc validation #21435

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
Oct 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion maint_tools/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
"sklearn.metrics.pairwise.rbf_kernel",
"sklearn.metrics.pairwise.sigmoid_kernel",
"sklearn.model_selection._split.check_cv",
"sklearn.model_selection._split.train_test_split",
"sklearn.model_selection._validation.cross_val_score",
"sklearn.model_selection._validation.cross_validate",
"sklearn.model_selection._validation.learning_curve",
Expand Down
4 changes: 1 addition & 3 deletions sklearn/model_selection/_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -2326,7 +2326,7 @@ def train_test_split(
shuffle=True,
stratify=None,
):
"""Split arrays or matrices into random train and test subsets
"""Split arrays or matrices into random train and test subsets.

Quick utility that wraps input validation and
``next(ShuffleSplit().split(X, y))`` and application to input data
Expand Down Expand Up @@ -2359,7 +2359,6 @@ def train_test_split(
Pass an int for reproducible output across multiple function calls.
See :term:`Glossary <random_state>`.


shuffle : bool, default=True
Whether or not to shuffle the data before splitting. If shuffle=False
then stratify must be None.
Expand Down Expand Up @@ -2410,7 +2409,6 @@ def train_test_split(

>>> train_test_split(y, shuffle=False)
[[0, 1, 2], [3, 4]]

"""
n_arrays = len(arrays)
if n_arrays == 0:
Expand Down
0