(self, a)
return res
Construct an element of `self` domain from `a`.
Construct an element of `self` domain from `a`.
Construct an element of self domain from a .
def new(self, a):
        """Construct an element of `self` domain from `a`. """
        res = self.dtype(a, self.dom, len(self.gens) - 1, ring=self)

        # make sure res is actually in our ring
        if res.denom().terms(order=self.order)[0][0] != (0,)*len(self.gens):
            from sympy.printing.str import sstr
            raise CoercionFailed("denominator %s not allowed in %s"
                                 % (sstr(res), self))
        return res
def new ( self , a ) : res = self . dtype ( a , self . dom , len ( self . gens ) - 1 , ring = self ) # make sure res is actually in our ring if res . denom ( ) . terms ( order = self . order ) [ 0 ] [ 0 ] != ( 0 , ) * len ( self . gens ) : from sympy . printing . str import sstr raise CoercionFailed ( "denominator %s not allowed in %s" % ( sstr ( res ) , self ) ) return res