'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.'

@property
def mass_matrix(self):

    if (self.eom is None):
        raise ValueError('Need    to    compute    the    equations    of    motion    first')
    if self.coneqs:
        return self._m_d.row_join(self.lam_coeffs.T)
    else:
        return self._m_d
