log_res = np.logaddexp(-3 * d[0, 0], -3 * d[0, 1]) - np.logaddexp(-3 * e[0,
    0], -3 * e[0, 1])
log_res
res = exp(log_res)
res
numpy division with RuntimeWarning: invalid value encountered in double_scalars