Inherits from
- spmatrix: SciPy.sparse.sparse.spmatrix
Attributes
Method summary
- __add__(self, other)
- __getitem__(self, key)
- __init__(self, A = None, shape = None, dtype = None)
- __len__(self)
- __mul__(self, other)
- __neg__(self)
- __radd__(self, other)
- __rmul__(self, other)
- __setitem__(self, key, value)
- __str__(self)
- conjtransp(self)
- copy(self)
- get(self, key, default = 0.0)
- getnnz(self)
- matvec(self, other)
- resize(self, shape)
- rmatvec(self, other, conjugate = True)
- split(self, cols_or_rows, columns = 1)
- take(self, cols_or_rows, columns = 1)
- toarray(self)
- tocsc(self, nzmax = None)
- tocsr(self, nzmax = None)
- transpose(self)
Inherited from base classes
- __abs__(self)
- __div__(self, other)
- __getattr__(self, attr)
- __iadd__(self, other)
- __idiv__(self, other)
- __imul__(self, other)
- __isub__(self, other)
- __iter__(self)
- __nonzero__(self)
- __pow__(self, other)
- __repr__(self)
- __rsub__(self, other)
- __sub__(self, other)
- __truediv__(self, other)
- asformat(self, format)
- astype(self, t)
- conj(self)
- conjugate(self)
- dot(self, other)
- getH(self)
- get_shape(self)
- getcol(self, j)
- getdata(self, num)
- getformat(self)
- getmaxprint(self)
- getnzmax(self)
- getrow(self, i)
- listprint(self, start, stop)
- matmat(self, other)
- mean(self, axis = None)
- reshape(self, shape)
- rowcol(self, num)
- save(self, file_name, format = """%d %d %f """)
- set_shape(self, shape)
- setdiag(self, values, k = 0)
- sum(self, axis = None)
- tocoo(self)
- todense(self)
- toself(self, copy = False)
Methods
- __add__(self, other)
- __getitem__(self, key)
If key=(i,j) is a pair of integers, return the corresponding element. If either i or j is a slice or sequence, return a new sparse matrix with just these elements.
- __init__(self, A = None, shape = None, dtype = None)
Create a new dictionary-of-keys sparse matrix. An optional argument A is accepted, which initializes the dok_matrix with it. This can be a tuple of dimensions (M, N) or a (dense) array to copy.
- __len__(self)
- __mul__(self, other)
- __neg__(self)
- __radd__(self, other)
- __rmul__(self, other)
- __setitem__(self, key, value)
- __str__(self)
- conjtransp(self)
Return the conjugate transpose
- copy(self)
- get(self, key, default = 0.0)
This overrides the dict.get method, providing type checking but otherwise equivalent functionality.
- getnnz(self)
- matvec(self, other)
- resize(self, shape)
Resize the matrix to dimensions given by 'shape', removing any non-zero elements that lie outside.
- rmatvec(self, other, conjugate = True)
- split(self, cols_or_rows, columns = 1)
- take(self, cols_or_rows, columns = 1)
- toarray(self)
- tocsc(self, nzmax = None)
Return Compressed Sparse Column format arrays for this matrix
- tocsr(self, nzmax = None)
Return Compressed Sparse Row format arrays for this matrix
- transpose(self)
Return the transpose
