def dup_transform(f, p, q, K):
    if not f:
        return []

    n = len(f) - 1
    h, Q = [f[0]], [[K.one]]

    for i in range(0, n):
        Q.append(dup_mul(Q[-1], q, K))

    for c, q in zip(f[1:], Q[1:]):
        h = dup_mul(h, p, K)
        q = dup_mul_ground(q, c, K)
        h = dup_add(h, q, K)

    return h
Mark a client as done.
dataset/ETHPy150Open sympy/sympy/sympy/polys/densetools.py/dup_transform--crossover with--dataset/ETHPy150Open google/grr/grr/lib/hunts/standard.py/GenericHunt.MarkDone