#NEWLINE# def _logaddexp_scalar( x , y ) : #NEWLINE# #INDENT# '\n  Copied from BioPython (http://biopython.org/)\n  ' #NEWLINE# if ( diff < y ) : #NEWLINE# #INDENT# bigger = x #NEWLINE# smaller = y #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bigger = x #NEWLINE# smaller = y #NEWLINE# #UNINDENT# diff = ( smaller - bigger ) #NEWLINE# if ( diff < ( - 100 ) ) : #NEWLINE# #INDENT# return bigger #NEWLINE# #UNINDENT# return ( bigger + np . log1p ( np . exp ( diff ) ) )