Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 449d916

Browse files
purna135jjerphanthomasjpfan
authored
DOC Ensures that get_data_home passes numpydoc validation (#22259)
Co-authored-by: Julien Jerphanion <[email protected]> Co-authored-by: Thomas J. Fan <[email protected]>
1 parent 24106c2 commit 449d916

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sklearn/datasets/_base.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333

3434

3535
def get_data_home(data_home=None) -> str:
36-
"""Return the path of the scikit-learn data dir.
36+
"""Return the path of the scikit-learn data directory.
3737
3838
This folder is used by some large dataset loaders to avoid downloading the
3939
data several times.
4040
41-
By default the data dir is set to a folder named 'scikit_learn_data' in the
41+
By default the data directory is set to a folder named 'scikit_learn_data' in the
4242
user home folder.
4343
4444
Alternatively, it can be set by the 'SCIKIT_LEARN_DATA' environment
@@ -52,6 +52,11 @@ def get_data_home(data_home=None) -> str:
5252
data_home : str, default=None
5353
The path to scikit-learn data directory. If `None`, the default path
5454
is `~/sklearn_learn_data`.
55+
56+
Returns
57+
-------
58+
data_home: str
59+
The path to scikit-learn data directory.
5560
"""
5661
if data_home is None:
5762
data_home = environ.get("SCIKIT_LEARN_DATA", join("~", "scikit_learn_data"))

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"sklearn.covariance._shrunk_covariance.ledoit_wolf",
1919
"sklearn.covariance._shrunk_covariance.ledoit_wolf_shrinkage",
2020
"sklearn.covariance._shrunk_covariance.shrunk_covariance",
21-
"sklearn.datasets._base.get_data_home",
2221
"sklearn.datasets._base.load_breast_cancer",
2322
"sklearn.datasets._base.load_digits",
2423
"sklearn.datasets._base.load_linnerud",

0 commit comments

Comments
 (0)