#NEWLINE# def _check_n_samples( n_samples , n_chan ) : #NEWLINE# #INDENT# 'Check to see if there are enough samples for reliable cov calc.' #NEWLINE# n_samples_min = ( ( 10 * ( n_chan + 1 ) ) // 2 ) #NEWLINE# if ( n_samples <= 0 ) : #NEWLINE# #INDENT# raise ValueError ( 'No samples found to compute the covariance matrix' ) #NEWLINE# #UNINDENT# if ( n_samples < n_samples_min ) : #NEWLINE# #INDENT# warn ( ( 'Too few samples (required : %d got : %d), covariance estimate may be unreliable' % ( n_samples_min , n_samples ) ) )