#NEWLINE# def find_minmax( lims , olims ) : #NEWLINE# #INDENT# '\n    Takes (a1, a2) and (b1, b2) as input and returns\n    (np.nanmin(a1, b1), np.nanmax(a2, b2)). Used to calculate\n    min and max values of a number of items.\n    ' #NEWLINE# try : #NEWLINE# #INDENT# limzip = zip ( list ( lims ) , list ( olims ) , [ np . nanmin , np . nanmax ] ) #NEWLINE# limits = tuple ( [ float ( fn ( [ l , ol ] ) ) for ( l , ol , fn ) in limzip ] ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# limits = ( np . NaN , np . NaN ) #NEWLINE# #UNINDENT# return limits