Example #1
0
 def DM(elems, domain):
     conv = lambda e: domain.from_sympy(sympify(e))
     elems = [[conv(e) for e in row] for row in elems]
     return DomainMatrix(elems, (len(elems), len(elems[0])), domain)
Example #2
0
 def _eval_row_del(self, row):
     self._rep = DomainMatrix.vstack(self._rep[:row, :],
                                     self._rep[row + 1:, :])
     self.rows -= 1
Example #3
0
 def _eval_eye(cls, rows, cols):
     rep = DomainMatrix.eye((rows, cols), ZZ)
     return cls._fromrep(rep)
Example #4
0
 def _eval_col_del(self, col):
     self._rep = DomainMatrix.hstack(self._rep[:, :col],
                                     self._rep[:, col + 1:])
     self.cols -= 1
Example #5
0
 def _eval_zeros(cls, rows, cols):
     rep = DomainMatrix.zeros((rows, cols), ZZ)
     return cls._fromrep(rep)