#NEWLINE# def h5_hist_data( filename , epoch_axis = True ) : #NEWLINE# #INDENT# ret = list ( ) #NEWLINE# with h5py . File ( filename , 'r' ) as f : #NEWLINE# #INDENT# if ( 'hist' in f ) : #NEWLINE# #INDENT# ( hists , config ) = [ f [ x ] for x in [ 'hist' , 'config' ] ] #NEWLINE# ( bins , offset , time_markers ) = [ hists . attrs [ x ] for x in [ 'bins' , 'offset' , 'time_markers' ] ] #NEWLINE# total_epochs = config . attrs [ 'total_epochs' ] #NEWLINE# total_minibatches = config . attrs [ 'total_minibatches' ] #NEWLINE# for ( hname , hdata ) in hists . iteritems ( ) : #NEWLINE# #INDENT# dw = ( total_epochs if ( time_markers == 'epoch_freq' ) else epoch_axis ) #NEWLINE# dh = bins #NEWLINE# ret . append ( ( hname , hdata [ ... ] , dh , dw , bins , offset ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret