8000 FIX #11215 : Changing return in docstring to yields for generator functions by Andrew-peng · Pull Request #11276 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

FIX #11215 : Changing return in docstring to yields for generator functions #11276

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 4 commits into from
Jun 15, 2018

Conversation

Andrew-peng
Copy link
Contributor

Reference Issues/PRs

Fixes #11215.

What does this implement/fix? Explain your changes.

I changed all the docstrings for generator functions to say Yields instead Returns.

Any other comments?

First OSS contribution :) 🥇

@@ -76,7 +76,7 @@ def split(self, X, y=None, groups=None):
Group labels for the samples used while splitting the dataset into
train/test set.

Returns
Yields
-------
Copy link
Member

Choose a reason for hiding this comment

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

You need to remove the last - to match the section length.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@rth
Copy link
Member
rth commented Jun 15, 2018

Two more changes are missing @Andrew-peng

$ git grep -n "The training set indices for that split." 
sklearn/model_selection/_split.py:82:            The training set indices for that split.
sklearn/model_selection/_split.py:307:            The training set indices for that split.
sklearn/model_selection/_split.py:653:            The training set indices for that split.
sklearn/model_selection/_split.py:740:            The training set indices for that split.
sklearn/model_selection/_split.py:1012:            The training set indices for that split.
sklearn/model_selection/_split.py:1188:            The training set indices for that split.
sklearn/model_selection/_split.py:1609:            The training set indices for that split.
sklearn/model_selection/_split.py:1769:            The training set indices for that split.
sklearn/model_selection/_split.py:1853:            The training set indices for that split.

see line numbers - there should be 9 sections changed, this PR only includes 7.

Otherwise LGTM, thanks.

@Andrew-peng
Copy link
Contributor Author

Just added, missed those

@amueller
Copy link
Member

LGTM, thanks!

@rth rth merged commit f1a3312 into scikit-learn:master Jun 15, 2018
@rth
Copy link
Member
rth commented Jun 15, 2018

Thank you, @Andrew-peng !

@Andrew-peng Andrew-peng deleted the doc/change-to-yield branch June 16, 2018 00:21
georgipeev pushed a commit to georgipeev/scikit-learn that referenced this pull request Jun 20, 2018
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.

GroupShuffelSplit return doc is incorrect
3 participants
0