def log_sum_log_semiring(vals):
"""Uses the ``logsumexp`` function in scipy to calculate the log of
the sum of a set of log values.
Args:
vals (set): List or set of numerical values
"""
return logsumexp(numpy.asarray([val for val in vals]))
#log_sum = log_sum_log_semiring
评论列表
文章目录