#NEWLINE# def transform( self , X , y = None ) : #NEWLINE# #INDENT# 'Center and scale the data\n\n        Parameters\n        ----------\n        X : array-like\n            The data used to scale along the specified axis.\n        ' #NEWLINE# if self . with_centering : #NEWLINE# #INDENT# check_is_fitted ( self , 'center_' ) #NEWLINE# #UNINDENT# if self . with_scaling : #NEWLINE# #INDENT# check_is_fitted ( self , 'scale_' ) #NEWLINE# #UNINDENT# X = self . _check_array ( X , self . copy ) #NEWLINE# if ( X . ndim == 1 ) : #NEWLINE# #INDENT# warnings . warn ( DEPRECATION_MSG_1D , DeprecationWarning ) #NEWLINE# #UNINDENT# if sparse . issparse ( X ) : #NEWLINE# #INDENT# if self . with_scaling : #NEWLINE# #INDENT# inplace_column_scale ( X , ( 1.0 / self . scale_ ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . with_centering : #NEWLINE# #INDENT# X -= self . center_ #NEWLINE# #UNINDENT# if self . with_scaling : #NEWLINE# #INDENT# X /= self . scale_ #NEWLINE# #UNINDENT# #UNINDENT# return X