File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 25
25
"sklearn.utils.fixes.threadpool_limits" ,
26
26
"sklearn.utils.gen_batches" ,
27
27
"sklearn.utils.gen_even_slices" ,
28
- "sklearn.utils.metaestimators.available_if" ,
29
28
"sklearn.utils.metaestimators.if_delegate_has_method" ,
30
29
]
31
30
FUNCTION_DOCSTRING_IGNORE_LIST = set (FUNCTION_DOCSTRING_IGNORE_LIST )
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ def out(*args, **kwargs):
141
141
142
142
143
143
def available_if (check ):
144
- """An attribute that is available only if check returns a truthy value
144
+ """An attribute that is available only if check returns a truthy value.
145
145
146
146
Parameters
147
147
----------
@@ -150,6 +150,12 @@ def available_if(check):
150
150
a truthy value if the attribute is available, and either return False
151
151
or raise an AttributeError if not available.
152
152
153
+ Returns
154
+ -------
155
+ callable
156
+ Callable makes the decorated method available if `check` returns
157
+ a truthy value, otherwise the decorated method is unavailable.
158
+
153
159
Examples
154
160
--------
155
161
>>> from sklearn.utils.metaestimators import available_if
You can’t perform that action at this time.
0 commit comments