(self, pos, mti)
return type(self)(newmat)
Insert one or more columns at the given column position.

        Examples
        ========

        >>> from sympy import zeros, ones
        >>> M = zeros(3)
        >>> V = ones(3, 1)
        >>> M.col_insert(1, V)
        Matrix([
        [0, 1, 0, 0],
        [0, 1, 0, 0],
        [0, 1, 0, 0]])

        See Also
        ========

        col
        row_insert
Insert one or more columns at the given column position.
Insert one or more columns at the given column position .
def col_insert(self, pos, mti):
        """Insert one or more columns at the given column position.

        Examples
        ========

        >>> from sympy import zeros, ones
        >>> M = zeros(3)
        >>> V = ones(3, 1)
        >>> M.col_insert(1, V)
        Matrix([
        [0, 1, 0, 0],
        [0, 1, 0, 0],
        [0, 1, 0, 0]])

        See Also
        ========

        col
        row_insert
        """
        if pos == 0:
            return mti.row_join(self)
        elif pos < 0:
            pos = self.cols + pos
        if pos < 0:
            pos = 0
        elif pos > self.cols:
            pos = self.cols

        if self.rows != mti.rows:
            raise ShapeError("self and mti must have the same number of rows.")

        from sympy.matrices import MutableMatrix
        newmat = MutableMatrix.zeros(self.rows, self.cols + mti.cols)
        i, j = pos, pos + mti.cols
        newmat[:, :i] = self[:, :i]
        newmat[:, i:j] = mti
        newmat[:, j:] = self[:, i:]
        return type(self)(newmat)
def col_insert ( self , pos , mti ) : if pos == 0 : return mti . row_join ( self ) elif pos < 0 : pos = self . cols + pos if pos < 0 : pos = 0 elif pos > self . cols : pos = self . cols if self . rows != mti . rows : raise ShapeError ( "self and mti must have the same number of rows." ) from sympy . matrices import MutableMatrix newmat = MutableMatrix . zeros ( self . rows , self . cols + mti . cols ) i , j = pos , pos + mti . cols newmat [ : , : i ] = self [ : , : i ] newmat [ : , i : j ] = mti newmat [ : , j : ] = self [ : , i : ] return type ( self ) ( newmat )