-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
DOC Ensures that fetch_rcv1 passes numpydoc validation #22225
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
DOC Ensures that fetch_rcv1 passes numpydoc validation #22225
Conversation
There was a problem hiding this 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 @SparklePigBang !
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks for the PR @SparklePigBang 😃 I left a comment with something that I believe would improve the documentation. Let me know what you think. |
Co-authored-by: Julien Jerphanion <[email protected]>
Thank you for the suggestion. It looks good to me. My only concern is that I haven't been able to find another docstring where the return attributes are itemised in this way. Would this be a problem? |
That's true, I think there is no other returned dictionary documented this way. What do you think @thomasjpfan @jjerphan? |
sklearn/datasets/_rcv1.py
Outdated
@@ -136,8 +136,8 @@ def fetch_rcv1( | |||
Returns | |||
------- | |||
dataset : :class:`~sklearn.utils.Bunch` | |||
Dictionary-like object. Returned only if `return_X_y` is False. Has | |||
the following attributes. | |||
Dictionary-like object. Returned only if `return_X_y` is False. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a failing test related to black
because there is a trailing white space in this line.
This looks better to me with this new comment. Let's merge after having the linting fixed. |
Reference Issues/PRs
Addresses #21350
What does this implement/fix? Explain your changes.
Ensured that datasets._rcv1.fetch_rcv1 passes numpydoc validation.
FUNCTION_DOCSTRING_IGNORE_LIST
.(data, target)
totuple
fromtuple if ``return_X_y`` is True
. It doesn't seem that the type of this return value depends on the value ofreturn_X_y
. Instead, whether or not such a return value exists depends on this.Any other comments?
The type description
tuple if ``return_X_y`` is True
appears in several other function docstrings.