Skip to content

DOC Fix description of the load_diabetes() return value - #34106

Merged
jeremiedbb merged 4 commits into
scikit-learn:mainfrom
0xAX:diabeters-ds-docs-improvement
May 25, 2026
Merged

jeremiedbb merged 4 commits into
scikit-learn:mainfrom
0xAX:diabeters-ds-docs-improvement

Conversation

@0xAX

@0xAX 0xAX commented May 24, 2026

Copy link
Copy Markdown
Contributor

What does this implement/fix? Explain your changes.

The description of the return value of the load_diabetes() function when the return_X_y parameter is passed seems was derived from load_csv_data() or load_gzip_compressed_csv_data(). This is wrong, because load_diabetes() returns one 2D array for data and 1D array for target, but not two 2D arrays.

The new description is unified with other dataset loader APIs and specifies the values of the array shapes related to the load_diabetes() function.

The description of the return value of the load_diabetes() when the
`return_X_y` parameter is passed seems was derived from
load_csv_data() or load_gzip_compressed_csv_data(). But it is wrong,
because load_diabetes() returns one 2D array for data and 1D array for
target but not two 2D arrays.

The new description is unified with other dataset loader APIs and
specifies the values of the array shapes related to the
load_diabetes() function.

@StefanieSenger StefanieSenger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, and I have found and fixed a few more inconsistencies. I will leave it to the next reviewer to merge this.

@StefanieSenger StefanieSenger added the Waiting for Second Reviewer First reviewer is done, need a second one! label May 24, 2026
@0xAX

0xAX commented May 24, 2026

Copy link
Copy Markdown
Contributor Author

ah yes, great catch, thank you @StefanieSenger

@jeremiedbb jeremiedbb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks

@jeremiedbb
jeremiedbb merged commit b993527 into scikit-learn:main May 25, 2026
33 checks passed
@jeremiedbb jeremiedbb mentioned this pull request Jun 1, 2026
16 tasks done
jeremiedbb pushed a commit that referenced this pull request Jun 2, 2026
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation module:datasets Waiting for Second Reviewer First reviewer is done, need a second one!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants