#NEWLINE# def loglike_branch( self , params , tau ) : #NEWLINE# #INDENT# ivs = [ ] #NEWLINE# for b in branches : #NEWLINE# #INDENT# ( probs , iv ) = loglike_leafbranch ( self , params , tau ) #NEWLINE# ivs . append ( b ) #NEWLINE# #UNINDENT# ivs = np . column_stack ( ivs ) #NEWLINE# exptiv = np . exp ( ( tau * ivs ) ) #NEWLINE# sumexptiv = exptiv . sum ( 1 ) #NEWLINE# logsumexpxb = np . log ( sumexpxb ) #NEWLINE# probs = ( exptiv / sumexptiv [ : , None ] )