#NEWLINE# def _check_array( self , X , copy ) : #NEWLINE# #INDENT# 'Makes sure centering is not enabled for sparse matrices.' #NEWLINE# X = check_array ( X , accept_sparse = ( 'csr' , 'csc' ) , copy = self . copy , ensure_2d = False , estimator = self , dtype = FLOAT_DTYPES ) #NEWLINE# if ( X . ndim == 1 ) : #NEWLINE# #INDENT# warnings . warn ( DEPRECATION_MSG_1D , DeprecationWarning ) #NEWLINE# #UNINDENT# if sparse . issparse ( X ) : #NEWLINE# #INDENT# if self . with_centering : #NEWLINE# #INDENT# raise ValueError ( 'Cannot center sparse matrices: use `with_centering=False` instead. See docstring for motivation and alternatives.' ) #NEWLINE# #UNINDENT# #UNINDENT# return X