(self)
Returns the mass matrix, which is augmented by the Lagrange
        multipliers, if necessary.

        If the system is described by 'n' generalized coordinates and there are
        no constraint equations then an n X n matrix is returned.

        If there are 'n' generalized coordinates and 'm' constraint equations
        have been supplied during initialization then an n X (n+m) matrix is
        returned. The (n + m - 1)th and (n + m)th columns contain the
        coefficients of the Lagrange multipliers.
Returns the mass matrix, which is augmented by the Lagrange
        multipliers, if necessary.
Returns the mass matrix which is augmented by the Lagrange multipliers if necessary .
def mass_matrix(self):
        """ Returns the mass matrix, which is augmented by the Lagrange
        multipliers, if necessary.

        If the system is described by 'n' generalized coordinates and there are
        no constraint equations then an n X n matrix is returned.

        If there are 'n' generalized coordinates and 'm' constraint equations
        have been supplied during initialization then an n X (n+m) matrix is
        returned. The (n + m - 1)th and (n + m)th columns contain the
        coefficients of the Lagrange multipliers.

        """

        if self.eom is None:
            raise ValueError('Need to compute the equations of motion first')

        #The 'dynamic' mass matrix is generated by the following
        self._m_d = (self.eom).jacobian(self._qdoubledots)

        if len(self.lam_coeffs) != 0:
            return (self._m_d).row_join((self.lam_coeffs).transpose())
        else:
            return self._m_d
def mass_matrix ( self ) : if self . eom is None : raise ValueError ( 'Need to compute the equations of motion first' ) #The 'dynamic' mass matrix is generated by the following self . _m_d = ( self . eom ) . jacobian ( self . _qdoubledots ) if len ( self . lam_coeffs ) != 0 : return ( self . _m_d ) . row_join ( ( self . lam_coeffs ) . transpose ( ) ) else : return self . _m_d