def from_sympy(self, expr):
        """Convert SymPy's number to ``dtype``. """
        number = expr.evalf(n=self.dps)

        if number.is_Number:
            return self.dtype(number)
        else:
            raise CoercionFailed("expected real number, got %s" % expr)
dataset/ETHPy150Open sympy/sympy/sympy/polys/domains/realfield.py/RealField.from_sympy/original