Skip to content

DOC Ensures that sklearn.datasets._base.load_breast_cancer passes numpydoc validation#22266

Closed
DennisOsei wants to merge 2 commits intoscikit-learn:mainfrom
DennisOsei:numpydoc-validation
Closed

DOC Ensures that sklearn.datasets._base.load_breast_cancer passes numpydoc validation#22266
DennisOsei wants to merge 2 commits intoscikit-learn:mainfrom
DennisOsei:numpydoc-validation

Conversation

@DennisOsei
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Addresses #21350

What does this implement/fix? Explain your changes.

  1. Removed sklearn.datasets._base.load_breast_cancer from FUNCTION_DOCSTRING_IGNORE_LIST
  2. Changed return value in sklearn.datasets._base.load_diabetes to original version.
  3. Added spaces before and after colon of return values in sklearn.datasets._base.load_breast_cancer.
  4. Change return value in sklearn.datasets._base.load_breast_cancer to :
    A tuple of two ndarrays. The first contains a 2D array of shape (569, 30)
    with each row representing one sample and each column representing the features.
    The second array of shape (569,) contains the target samples.

Any other comments?

I'm still getting the "return value has no description" error.

Comment on lines +705 to +707
A tuple of two ndarrays. The first contains a 2D array of shape (569, 30)
with each row representing one sample and each column representing the features.
The second array of shape (569,) contains the target samples.
Copy link
Copy Markdown
Member

@ArturoAmorQ ArturoAmorQ Jan 27, 2022

Choose a reason for hiding this comment

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

Suggested change
A tuple of two ndarrays. The first contains a 2D array of shape (569, 30)
with each row representing one sample and each column representing the features.
The second array of shape (569,) contains the target samples.
A tuple of two ndarrays by default. The first contains a 2D ndarray of
shape (569, 30) with each row representing one sample and each column
representing the features. The second ndarray of shape (569,) contains
the target samples. If `as_frame=True`, both arrays are pandas objects.

Maybe being more explicit here could make the description easier to understand.

Also try to follow the PEP 8 convention, i.e. limit all lines to a maximum of 79 characters and avoid blank spaces at the end of each line.

Copy link
Copy Markdown
Member

@ArturoAmorQ ArturoAmorQ Jan 27, 2022

Choose a reason for hiding this comment

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

I'm still getting the "return value has no description" error.

The following lines of code are creating the error:

The copy of UCI ML Breast Cancer Wisconsin (Diagnostic) dataset is
downloaded from:
https://goo.gl/U2Uwz2

I propose moving them to the description in the header below the table.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the help @ArturoAmorQ it worked.

@glemaitre
Copy link
Copy Markdown
Member

@DennisOsei Additionally to @ArturoAmorQ comment, could you solve the conflict by merging main into your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants