(self, elem, M=None)
return r
Convert ``elem`` into the internal represantition.

        Mostly called implicitly.

        >>> from sympy.abc import x
        >>> from sympy import QQ
        >>> M = QQ.old_poly_ring(x).free_module(2).submodule([1, x])
        >>> M.convert([2, 2*x])
        [2, 2*x]
Convert ``elem`` into the internal represantition.
Convert elem into the internal represantition .
def convert(self, elem, M=None):
        """
        Convert ``elem`` into the internal represantition.

        Mostly called implicitly.

        >>> from sympy.abc import x
        >>> from sympy import QQ
        >>> M = QQ.old_poly_ring(x).free_module(2).submodule([1, x])
        >>> M.convert([2, 2*x])
        [2, 2*x]
        """
        if isinstance(elem, self.container.dtype) and elem.module is self:
            return elem
        r = copy(self.container.convert(elem, M))
        r.module = self
        if not self._contains(r):
            raise CoercionFailed
        return r
def convert ( self , elem , M = None ) : if isinstance ( elem , self . container . dtype ) and elem . module is self : return elem r = copy ( self . container . convert ( elem , M ) ) r . module = self if not self . _contains ( r ) : raise CoercionFailed return r