DOC Ensures that fetch_rcv1 passes numpydoc validation#22225
DOC Ensures that fetch_rcv1 passes numpydoc validation#22225thomasjpfan merged 4 commits intoscikit-learn:mainfrom
Conversation
thomasjpfan
left a comment
There was a problem hiding this comment.
Thank you for the PR @SparklePigBang !
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 <git@jjerphan.xyz>
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
| 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.
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)totuplefromtuple 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 Trueappears in several other function docstrings.