#NEWLINE# def _data_to_matrix( self , data , n_samples ) : #NEWLINE# #INDENT# if ( n_samples is None ) : #NEWLINE# #INDENT# n_samples = len ( data ) #NEWLINE# #UNINDENT# if ( not isinstance ( data , np . ndarray ) ) : #NEWLINE# #INDENT# data = np . array ( data ) [ : n_samples ] #NEWLINE# #UNINDENT# return ( data , n_samples )