#NEWLINE# def _get_data_lim( arr , n_spikes = None ) : #NEWLINE# #INDENT# n = arr . shape [ 0 ] #NEWLINE# k = ( max ( 1 , ( n // n_spikes ) ) if n_spikes else 1 ) #NEWLINE# arr = np . abs ( arr [ : : k ] ) #NEWLINE# n = arr . shape [ 0 ] #NEWLINE# arr = arr . reshape ( ( n , ( - 1 ) ) ) #NEWLINE# return arr . max ( )