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

Skip to content

Commit b580d34

Browse files
authored
DOC update description of X in FunctionTransformer.transform() (#24844)
1 parent bb3a07f commit b580d34

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sklearn/preprocessing/_function_transformer.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ def fit(self, X, y=None):
202202
203203
Parameters
204204
----------
205-
X : array-like, shape (n_samples, n_features)
205+
X : {array-like, sparse-matrix} of shape (n_samples, n_features) \
206+
if `validate=True` else any object that `func` can handle
206207
Input array.
207208
208209
y : Ignored
@@ -224,7 +225,8 @@ def transform(self, X):
224225
225226
Parameters
226227
----------
227-
X : array-like, shape (n_samples, n_features)
228+
X : {array-like, sparse-matrix} of shape (n_samples, n_features) \
229+
if `validate=True` else any object that `func` can handle
228230
Input array.
229231
230232
Returns
@@ -240,7 +242,8 @@ def inverse_transform(self, X):
240242
241243
Parameters
242244
----------
243-
X : array-like, shape (n_samples, n_features)
245+
X : {array-like, sparse-matrix} of shape (n_samples, n_features) \
246+
if `validate=True` else any object that `inverse_func` can handle
244247
Input array.
245248
246249
Returns

0 commit comments

Comments
 (0)