def dup_trunc(f, p, K):
    if K.is_ZZ:
        g = []

        for c in f:
            c = c % p

            if c > p // 2:
                g.append(c - p)
            else:
                g.append(c)
    else:
        g = [ c % p for c in f ]

    return dup_strip(g)
Saves the validation parameters.
dataset/ETHPy150Open sympy/sympy/sympy/polys/densetools.py/dup_trunc--crossover with--dataset/ETHPy150Open enthought/traits/traits/trait_types.py/BaseTuple.init_fast_validator