def _parallel_cov(cov_a, avg_xa, avg_ya, count_a, cov_b, avg_xb, avg_yb, count_b):
    """Update cov_a with cov_b."""
    idx = count_b > 0
    deltax = avg_xb - avg_xa
    deltay = avg_yb - avg_ya
    c_a = cov_a * count_a
    c_b = cov_b * count_b
    cov_a[idx] = (
        c_a[idx]
        + c_b[idx]
        + deltax[idx]
        * deltay[idx]
        * count_a[idx]
        * count_b[idx]
        / (count_a[idx] + count_b[idx])
    )
    cov_a[idx] = cov_a[idx] / (count_a[idx] + count_b[idx])
Update cov_a with cov_b.
pysteps/verification/detcontscores.py