diff --git a/sklearn/preprocessing/_function_transformer.py b/sklearn/preprocessing/_function_transformer.py index f3d98903f8571..a4f5448a0922c 100644 --- a/sklearn/preprocessing/_function_transformer.py +++ b/sklearn/preprocessing/_function_transformer.py @@ -202,7 +202,8 @@ def fit(self, X, y=None): Parameters ---------- - X : array-like, shape (n_samples, n_features) + X : {array-like, sparse-matrix} of shape (n_samples, n_features) \ + if `validate=True` else any object that `func` can handle Input array. y : Ignored @@ -224,7 +225,8 @@ def transform(self, X): Parameters ---------- - X : array-like, shape (n_samples, n_features) + X : {array-like, sparse-matrix} of shape (n_samples, n_features) \ + if `validate=True` else any object that `func` can handle Input array. Returns @@ -240,7 +242,8 @@ def inverse_transform(self, X): Parameters ---------- - X : array-like, shape (n_samples, n_features) + X : {array-like, sparse-matrix} of shape (n_samples, n_features) \ + if `validate=True` else any object that `inverse_func` can handle Input array. Returns