@@ -112,12 +112,10 @@ class StandardScaler(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
112112 def transform (self , X : spmatrix , copy : None | bool = None ) -> spmatrix : ...
113113 @overload
114114 def transform (self , X : ArrayLike , copy : None | bool = None ) -> ndarray : ...
115- def transform (self , X : MatrixLike , copy : None | bool = None ) -> ndarray | spmatrix : ...
116115 @overload
117116 def inverse_transform (self , X : spmatrix , copy : None | bool = None ) -> spmatrix : ...
118117 @overload
119118 def inverse_transform (self , X : ArrayLike , copy : None | bool = None ) -> ndarray : ...
120- def inverse_transform (self , X : MatrixLike | ArrayLike , copy : None | bool = None ) -> ndarray | spmatrix : ...
121119
122120class MaxAbsScaler (OneToOneFeatureMixin , TransformerMixin , BaseEstimator ):
123121 n_samples_seen_ : int = ...
@@ -135,12 +133,10 @@ class MaxAbsScaler(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
135133 def transform (self , X : spmatrix ) -> spmatrix : ...
136134 @overload
137135 def transform (self , X : ArrayLike ) -> ndarray : ...
138- def transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
139136 @overload
140137 def inverse_transform (self , X : spmatrix ) -> spmatrix : ...
141138 @overload
142139 def inverse_transform (self , X : ArrayLike ) -> ndarray : ...
143- def inverse_transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
144140
145141def maxabs_scale (X : MatrixLike | ArrayLike , * , axis : Int = 0 , copy : bool = True ): ...
146142
@@ -166,12 +162,10 @@ class RobustScaler(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
166162 def transform (self , X : spmatrix ) -> spmatrix : ...
167163 @overload
168164 def transform (self , X : ArrayLike ) -> ndarray : ...
169- def transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
170165 @overload
171166 def inverse_transform (self , X : spmatrix ) -> spmatrix : ...
172167 @overload
173168 def inverse_transform (self , X : ArrayLike ) -> ndarray : ...
174- def inverse_transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
175169
176170@overload
177171def robust_scale (
@@ -186,7 +180,7 @@ def robust_scale(
186180) -> spmatrix : ...
187181@overload
188182def robust_scale (
189- X : ndarray ,
183+ X : ArrayLike ,
190184 * ,
191185 axis : Int = 0 ,
192186 with_centering : bool = True ,
@@ -195,16 +189,6 @@ def robust_scale(
195189 copy : bool = True ,
196190 unit_variance : bool = False ,
197191) -> ndarray : ...
198- def robust_scale (
199- X : MatrixLike ,
200- * ,
201- axis : Int = 0 ,
202- with_centering : bool = True ,
203- with_scaling : bool = True ,
204- quantile_range : tuple [float , float ] = ...,
205- copy : bool = True ,
206- unit_variance : bool = False ,
207- ) -> ndarray | spmatrix : ...
208192@overload
209193def normalize (
210194 X : spmatrix ,
@@ -241,14 +225,6 @@ def normalize(
241225 copy : bool = True ,
242226 return_norm : Literal [False ] = False ,
243227) -> ndarray : ...
244- def normalize (
245- X : MatrixLike | ArrayLike ,
246- norm : Literal ["l1" , "l2" , "max" ] = "l2" ,
247- * ,
248- axis : int = 1 ,
249- copy : bool = True ,
250- return_norm : bool = False ,
251- ) -> csr_matrix | tuple [ndarray | spmatrix , ndarray ] | ndarray : ...
252228
253229class Normalizer (OneToOneFeatureMixin , TransformerMixin , BaseEstimator ):
254230 feature_names_in_ : ndarray = ...
@@ -262,7 +238,6 @@ class Normalizer(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
262238 def transform (self , X : spmatrix , copy : None | bool = None ) -> spmatrix : ...
263239 @overload
264240 def transform (self , X : ArrayLike , copy : None | bool = None ) -> ndarray : ...
265- def transform (self , X : MatrixLike | ArrayLike , copy : None | bool = None ) -> ndarray | spmatrix : ...
266241
267242def binarize (X : MatrixLike | ArrayLike , * , threshold : Float = 0.0 , copy : bool = True ) -> ndarray | spmatrix : ...
268243
@@ -278,7 +253,6 @@ class Binarizer(OneToOneFeatureMixin, TransformerMixin, BaseEstimator):
278253 def transform (self , X : spmatrix , copy : None | bool = None ) -> spmatrix : ...
279254 @overload
280255 def transform (self , X : ArrayLike , copy : None | bool = None ) -> ndarray : ...
281- def transform (self , X : MatrixLike | ArrayLike , copy : None | bool = None ) -> ndarray | spmatrix : ...
282256
283257class KernelCenterer (ClassNamePrefixFeaturesOutMixin , TransformerMixin , BaseEstimator ):
284258 feature_names_in_ : ndarray = ...
@@ -294,7 +268,6 @@ class KernelCenterer(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEsti
294268def add_dummy_feature (X : spmatrix , value : Float = 1.0 ) -> spmatrix : ...
295269@overload
296270def add_dummy_feature (X : ArrayLike , value : Float = 1.0 ) -> ndarray : ...
297- def add_dummy_feature (X : MatrixLike | ArrayLike , value : Float = 1.0 ) -> ndarray | spmatrix : ...
298271
299272class QuantileTransformer (OneToOneFeatureMixin , TransformerMixin , BaseEstimator ):
300273 feature_names_in_ : ndarray = ...
@@ -324,12 +297,10 @@ class QuantileTransformer(OneToOneFeatureMixin, TransformerMixin, BaseEstimator)
324297 def transform (self , X : spmatrix ) -> spmatrix : ...
325298 @overload
326299 def transform (self , X : ArrayLike ) -> ndarray : ...
327- def transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
328300 @overload
329301 def inverse_transform (self , X : spmatrix ) -> spmatrix : ...
330302 @overload
331303 def inverse_transform (self , X : ArrayLike ) -> ndarray : ...
332- def inverse_transform (self , X : MatrixLike | ArrayLike ) -> ndarray | spmatrix : ...
333304
334305@overload
335306def quantile_transform (
@@ -355,17 +326,6 @@ def quantile_transform(
355326 random_state : RandomState | None | Int = None ,
356327 copy : bool = True ,
357328) -> ndarray : ...
358- def quantile_transform (
359- X : MatrixLike | ArrayLike ,
360- * ,
361- axis : Int = 0 ,
362- n_quantiles : Int = 1000 ,
363- output_distribution : Literal ["uniform" , "normal" ] = "uniform" ,
364- ignore_implicit_zeros : bool = False ,
365- subsample : Int = ...,
366- random_state : RandomState | None | Int = None ,
367- copy : bool = True ,
368- ) -> ndarray | spmatrix : ...
369329
370330class PowerTransformer (OneToOneFeatureMixin , TransformerMixin , BaseEstimator ):
371331 feature_names_in_ : ndarray = ...
0 commit comments