class_docstr: Helper class for all homomoprhisms which are expressed via a matrix.
  
  That is, for such homomorphisms ``domain`` is contained in a module
  generated by finitely many elements `e_1, \ldots, e_n`, so that the
  homomorphism is determined uniquely by its action on the `e_i`. It
  can thus be represented as a vector of elements of the codomain module,
  or potentially a supermodule of the codomain module
  (and hence conventionally as a matrix, if there is a similar interpretation
  for elements of the codomain module).
  
  Note that this class does *not* assume that the `e_i` freely generate a
  submodule, nor that ``domain`` is even all of this submodule. It exists
  only to unify the interface.
  
  Do not instantiate.
  
  Attributes:
  
  - matrix - the list of images determining the homomorphism.
  NOTE: the elements of matrix belong to either self.codomain or
        self.codomain.container
  
  Still non-implemented methods:
  
  - kernel
  - _apply
class_docstr_tok: ["Helper","class","for","all","homomoprhisms","which","are","expressed","via","a","matrix",".","That","is",",","for","such","homomorphisms","``","domain","``","is","contained","in","a","module","generated","by","finitely","many","elements","`","e_1",",","\\ldots",",","e_n","`",",","so","that","the","homomorphism","is","determined","uniquely","by","its","action","on","the","`","e_i","`",".","It","can","thus","be","represented","as","a","vector","of","elements","of","the","codomain","module",",","or","potentially","a","supermodule","of","the","codomain","module","(","and","hence","conventionally","as","a","matrix",",","if","there","is","a","similar","interpretation","for","elements","of","the","codomain","module",")",".","Note","that","this","class","does","*","not","*","assume","that","the","`","e_i","`","freely","generate","a","submodule",",","nor","that","``","domain","``","is","even","all","of","this","submodule",".","It","exists","only","to","unify","the","interface",".","Do","not","instantiate",".","Attributes",":","-","matrix","-","the","list","of","images","determining","the","homomorphism",".","NOTE",":","the","elements","of","matrix","belong","to","either","self.codomain","or","self.codomain.container","Still","non-implemented","methods",":","-","kernel","-","_apply"]
docstr: Helper function which returns a SymPy matrix ``self.matrix``.
code: def _sympy_matrix(self):
      """Helper function which returns a SymPy matrix ``self.matrix``."""
      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
  
imports: from sympy.polys.agca.modules import Module, FreeModule, QuotientModule, SubModule, SubQuotientModule
  from sympy.polys.polyerrors import CoercionFailed
label_desc: Use image node_id 2 for calling the MatrixHomomorphism obj's underlying member method code with example usage: obj._sympy_matrix() and returns: Matrix