Exemple #1
0
 def _new(cls, *args, **kwargs):
     s = MutableSparseMatrix(*args)
     rows, cols, smat = s.rows, s.cols, s._smat
     obj = Basic.__new__(cls, Integer(rows), Integer(cols), Dict(smat))
     obj._rows = rows
     obj._cols = cols
     obj._smat = smat
     return obj
Exemple #2
0
 def _new(cls, *args, **kwargs):
     s = MutableSparseMatrix(*args)
     rows = Integer(s.rows)
     cols = Integer(s.cols)
     mat = Dict(s._smat)
     obj = Basic.__new__(cls, rows, cols, mat)
     obj.rows = s.rows
     obj.cols = s.cols
     obj._smat = s._smat
     return obj