#NEWLINE# def _process_data( self , values , edges ) : #NEWLINE# #INDENT# '\n        Ensure that edges are specified as left and right edges of the\n        histogram bins rather than bin centers.\n        ' #NEWLINE# settings = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# ( values , edges ) = ( values if isinstance ( values , tuple ) else ( self , edges ) ) #NEWLINE# if isinstance ( values , Element2D ) : #NEWLINE# #INDENT# settings = dict ( values . get_param_values ( onlychanged = True ) ) #NEWLINE# edges = values . data [ : , 0 ] . copy ( ) #NEWLINE# values = values . data [ : , 1 ] . copy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( isinstance ( values , np . ndarray ) and ( len ( values . shape ) == 2 ) ) : #NEWLINE# #INDENT# edges = values [ : , 0 ] #NEWLINE# values = values [ : , 1 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if all ( ( isinstance ( el , tuple ) for el in values ) ) : #NEWLINE# #INDENT# ( edges , values ) = zip ( * values ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# values = np . array ( values ) #NEWLINE# if ( edges is None ) : #NEWLINE# #INDENT# edges = np . arange ( len ( values ) , dtype = np . float ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# edges = np . array ( edges , dtype = np . float ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( len ( edges ) == len ( values ) ) : #NEWLINE# #INDENT# edges = compute_edges ( edges ) #NEWLINE# #UNINDENT# return ( values , edges , settings )