

def dmp_primitive(f, u, K):
    '\n    Returns multivariate content and a primitive polynomial.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, ZZ\n    >>> R, x,y, = ring("x,y", ZZ)\n\n    >>> R.dmp_primitive(2*x*y + 6*x + 4*y + 12)\n    (2*y + 6, x + 2)\n\n    '
    (cont, v) = (dmp_content(f, u, K), (u - 1))
    if (dmp_zero_p(f, u) or dmp_one_p(K, v, K)):
        return (cont, f)
    else:
        return (cont, [dmp_quo(c, cont, v, K) for c in f])

dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py dmp_primitive/VarMisuse@50/190 `cont`->`K`