DOC Ensures that load_wine passes numpydoc#22469
DOC Ensures that load_wine passes numpydoc#22469jeremiedbb merged 4 commits intoscikit-learn:mainfrom
Conversation
…oved to the beginning of function documentation
jmloyola
left a comment
There was a problem hiding this comment.
@sharmadharmpal Thanks for the PR :D
I left one comment with something to change.
Also, try to keep the length of the documentation lines to less than 80 characters. I think it is not a written rule, yet it is something that is applied in most of the project code. Maybe someone else can correct me on this.
Finally, it'd be great if we add items for each of the data return attributes. You can look to this PR for reference. You have to do something like:
"""
Returns
-------
data : :class:`~sklearn.utils.Bunch`
Dictionary-like object, with the following attributes:
- data : {ndarray, dataframe} of shape (178, 13)
The data matrix. If `as_frame=True`, `data` will be a pandas
DataFrame.
"""
sklearn/datasets/_base.py
Outdated
| A tuple of two ndarrays. The first contains a 2D array of shape (178, 13) | ||
| with each row representing one sample and each column representing the features. | ||
| The second array of shape (178,) contains the target samples. |
There was a problem hiding this comment.
This is not the case when as_frame=True where data and target are pandas objects.
There was a problem hiding this comment.
This is a good point that we let passed in other PRs :)
So I would propose ndarray or dataframe or ndarray or series?
There was a problem hiding this comment.
This is not the case when
as_frame=Truewheredataandtargetare pandas objects.
This PR is an example of the wording we used to take this point into account
Since moving to the |
|
It was my first change in open source. It have copied from other's comments in the code and modified according to function definition, next time will try as recommended.. |
|
It's Ok @sharmadharmpal. |
Hi @jmloyola can you please confirm below is correct? Or please guide me. |
|
It's fine. I'd only add in the beginning:
|
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
Reference Issues/PRs
Addresses #21350
What does this implement/fix? Explain your changes.
DOC Ensures that load_wine passes numpydoc validation
Any other comments?
No
Thank You