Skip to content

Commit c5af93c

Browse files
authored
DOC Ensures that load_diabetes passes numpydoc validation (scikit-learn#21526)
1 parent 9b605b4 commit c5af93c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

maint_tools/test_docstrings.py

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"sklearn.datasets._base.get_data_home",
3232
"sklearn.datasets._base.load_boston",
3333
"sklearn.datasets._base.load_breast_cancer",
34-
"sklearn.datasets._base.load_diabetes",
3534
"sklearn.datasets._base.load_digits",
3635
"sklearn.datasets._base.load_files",
3736
"sklearn.datasets._base.load_iris",

sklearn/datasets/_base.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ def load_diabetes(*, return_X_y=False, as_frame=False):
928928
929929
Parameters
930930
----------
931-
return_X_y : bool, default=False.
931+
return_X_y : bool, default=False
932932
If True, returns ``(data, target)`` instead of a Bunch object.
933933
See below for more information about the `data` and `target` object.
934934
@@ -969,7 +969,9 @@ def load_diabetes(*, return_X_y=False, as_frame=False):
969969
The path to the location of the target.
970970
971971
(data, target) : tuple if ``return_X_y`` is True
972-
972+
Returns a tuple of two ndarray of shape (n_samples, n_features)
973+
A 2D array with each row representing one sample and each column
974+
representing the features and/or target of a given sample.
973975
.. versionadded:: 0.18
974976
"""
975977
data_filename = "diabetes_data.csv.gz"

0 commit comments

Comments
 (0)