'Helper function which returns a sympy matrix ``self.matrix``.'

def _sympy_matrix(self):

    from sympy.matrices import Matrix
    c = (lambda x: x)
    if isinstance(self.codomain, (QuotientModule, SubQuotientModule)):
        c = (lambda x: x.data)
    return Matrix([[self.ring.to_sympy(y) for y in c(x)] for x in self.matrix]).T
