#NEWLINE# def __trim_stack( cqt_resp , n_bins , real ) : #NEWLINE# #INDENT# 'Helper function to trim and stack a collection of CQT responses' #NEWLINE# max_col = min ( [ x . shape [ 1 ] for x in cqt_resp ] ) #NEWLINE# cqt_resp = np . vstack ( [ x [ : , : max_col ] for x in cqt_resp ] [ : : ( - 1 ) ] ) #NEWLINE# C = np . ascontiguousarray ( cqt_resp [ ( - n_bins ) : ] . T ) . T #NEWLINE# if real : #NEWLINE# #INDENT# C = np . abs ( C ) #NEWLINE# #UNINDENT# return cqt_resp