def to_sympy(self, a): """Convert `a` to a SymPy object. """ return SymPyRational(a.numerator, a.denominator)
def to_sympy(self, a): """Convert `a` to a SymPy object. """ return SymPyRational(int(gmpy_numer(a)), int(gmpy_denom(a)))