'Clear denominators, but keep the ground domain.
Examples
>>> from sympy import Poly, S, QQ
>>> from sympy.abc import x
>>> f = Poly(x/2 + S(1)/3, x, domain=QQ)
>>> f.clear_denoms()
(6, Poly(3*x + 2, x, domain=\'QQ\'))
>>> f.clear_denoms(convert=True)
(6, Poly(3*x + 2, x, domain=\'ZZ\'))'

def clear_denoms(self, convert=False):

    f = self
    if (not f.rep.dom.is_Field):
        return (S.One, f)
    dom = f.get_domain()
    if dom.has_assoc_Ring:
        dom = f.rep.dom.get_ring()
    if hasattr(f.rep, 'clear_denoms'):
        (coeff, result) = f.rep.clear_denoms()
    else:
        raise OperationNotSupported(f, 'clear_denoms')
    (coeff, f) = (dom.to_sympy(coeff), f.per(result))
    if ((not convert) or (not dom.has_assoc_Ring)):
        return (coeff, f)
    else:
        return (coeff, f.to_ring())
