Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 18a4576

Browse filesBrowse files
MAINT Parameters validation for sklearn.datasets.clear_data_home (#26259)
Co-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>
1 parent e20b3a6 commit 18a4576
Copy full SHA for 18a4576

File tree

Expand file treeCollapse file tree

2 files changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+7
-1
lines changed

‎sklearn/datasets/_base.py

Copy file name to clipboardExpand all lines: sklearn/datasets/_base.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,17 @@ def get_data_home(data_home=None) -> str:
6868
return data_home
6969

7070

71+
@validate_params(
72+
{
73+
"data_home": [str, os.PathLike, None],
74+
}
75+
)
7176
def clear_data_home(data_home=None):
7277
"""Delete all the content of the data home cache.
7378
7479
Parameters
7580
----------
76-
data_home : str, default=None
81+
data_home : str or path-like, default=None
7782
The path to scikit-learn data directory. If `None`, the default path
7883
is `~/sklearn_learn_data`.
7984
"""

‎sklearn/tests/test_public_functions.py

Copy file name to clipboardExpand all lines: sklearn/tests/test_public_functions.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def _check_function_param_validation(
119119
"sklearn.covariance.empirical_covariance",
120120
"sklearn.covariance.ledoit_wolf_shrinkage",
121121
"sklearn.covariance.shrunk_covariance",
122+
"sklearn.datasets.clear_data_home",
122123
"sklearn.datasets.dump_svmlight_file",
123124
"sklearn.datasets.fetch_20newsgroups",
124125
"sklearn.datasets.fetch_20newsgroups_vectorized",

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.