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

Skip to content

Commit b850a94

Browse files
authored
DOC Ensures that check_is_fitted passes numpydoc validation (#24454)
1 parent 1645a8a commit b850a94

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

sklearn/tests/test_docstrings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"sklearn.utils.sparsefuncs.incr_mean_variance_axis",
5050
"sklearn.utils.sparsefuncs.inplace_swap_row_csc",
5151
"sklearn.utils.sparsefuncs.inplace_swap_row_csr",
52-
"sklearn.utils.validation.check_is_fitted",
5352
]
5453
FUNCTION_DOCSTRING_IGNORE_LIST = set(FUNCTION_DOCSTRING_IGNORE_LIST)
5554

sklearn/utils/validation.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ def check_is_fitted(estimator, attributes=None, *, msg=None, all_or_any=all):
12941294
Parameters
12951295
----------
12961296
estimator : estimator instance
1297-
estimator instance for which the check is performed.
1297+
Estimator instance for which the check is performed.
12981298
12991299
attributes : str, list or tuple of str, default=None
13001300
Attribute name(s) given as string or a list/tuple of strings
@@ -1317,12 +1317,11 @@ def check_is_fitted(estimator, attributes=None, *, msg=None, all_or_any=all):
13171317
all_or_any : callable, {all, any}, default=all
13181318
Specify whether all or any of the given attributes must exist.
13191319
1320-
Returns
1321-
-------
1322-
None
1323-
13241320
Raises
13251321
------
1322+
TypeError
1323+
If the estimator is a class or not an estimator instance
1324+
13261325
NotFittedError
13271326
If the attributes are not found.
13281327
"""

0 commit comments

Comments
 (0)