Row-based linked list sparse matrix
This is an efficient structure for constructing sparse matrices incrementally.
Notes
Sparse matrices can be used in arithmetic operations: they support addition, subtraction, multiplication, division, and matrix power.
Attributes
shape | |
ndim | int(x[, base]) -> integer |
nnz |
dtype | dtype | Data type of the matrix |
data | LIL format data array of the matrix | |
rows | LIL format row index array of the matrix |
Methods
asformat(format) | Return this matrix in a given sparse format |
asfptype() | Upcast matrix to a floating point format (if necessary) |
astype(t) | |
conj() | |
conjugate() | |
copy() | |
diagonal() | Returns the main diagonal of the matrix |
dot(other) | |
getH() | |
get_shape() | |
getcol(j) | Returns a copy of column j of the matrix, as an (m x 1) sparse |
getformat() | |
getmaxprint() | |
getnnz() | |
getrow(i) | Returns a copy of the ‘i’th row. |
getrowview(i) | Returns a view of the ‘i’th row (without copying). |
mean([axis]) | Average the matrix over the given axis. |
multiply(other) | Point-wise multiplication by another matrix |
nonzero() | nonzero indices |
reshape(shape) | |
set_shape(shape) | |
setdiag(values[, k]) | Fills the diagonal elements {a_ii} with the values from the given sequence. |
sum([axis]) | Sum the matrix over the given axis. |
toarray() | |
tobsr([blocksize]) | |
tocoo() | |
tocsc() | Return Compressed Sparse Column format arrays for this matrix. |
tocsr() | Return Compressed Sparse Row format arrays for this matrix. |
todense() | |
todia() | |
todok() | |
tolil([copy]) | |
transpose() |