Attributes
- ndim
ndim = 2
- shape
shape = property(fget = get_shape, fset = set_shape)
Method summary
- __abs__(self)
- __add__(self, other)
- __div__(self, other)
- __getattr__(self, attr)
- __iadd__(self, other)
- __idiv__(self, other)
- __imul__(self, other)
- __init__(self, maxprint = MAXPRINT, allocsize = ALLOCSIZE)
- __isub__(self, other)
- __iter__(self)
- __len__(self)
- __mul__(self, other)
- __neg__(self)
- __nonzero__(self)
- __pow__(self, other)
- __radd__(self, other)
- __repr__(self)
- __rmul__(self, other)
- __rsub__(self, other)
- __str__(self)
- __sub__(self, other)
- __truediv__(self, other)
- asformat(self, format)
- astype(self, t)
- conj(self)
- conjugate(self)
- copy(self)
- dot(self, other)
- getH(self)
- get_shape(self)
- getcol(self, j)
- getdata(self, num)
- getformat(self)
- getmaxprint(self)
- getnnz(self)
- getnzmax(self)
- getrow(self, i)
- listprint(self, start, stop)
- matmat(self, other)
- matvec(self, other)
- mean(self, axis = None)
- reshape(self, shape)
- rmatvec(self, other, conjugate = True)
- rowcol(self, num)
- save(self, file_name, format = """%d %d %f """)
- set_shape(self, shape)
- setdiag(self, values, k = 0)
- sum(self, axis = None)
- toarray(self)
- tocoo(self)
- todense(self)
- toself(self, copy = False)
- transpose(self)
Methods
- __abs__(self)
- __add__(self, other)
- __div__(self, other)
- __getattr__(self, attr)
- __iadd__(self, other)
- __idiv__(self, other)
- __imul__(self, other)
- __init__(self, maxprint = MAXPRINT, allocsize = ALLOCSIZE)
- __isub__(self, other)
- __iter__(self)
- __len__(self)
- __mul__(self, other)
- __neg__(self)
- __nonzero__(self)
- __pow__(self, other)
- __radd__(self, other)
- __repr__(self)
- __rmul__(self, other)
- __rsub__(self, other)
- __str__(self)
- __sub__(self, other)
- __truediv__(self, other)
- asformat(self, format)
- astype(self, t)
- conj(self)
- conjugate(self)
- copy(self)
- dot(self, other)
A generic interface for matrix-matrix or matrix-vector multiplication. Returns A.transpose().conj() * other or A.transpose() * other.
- getH(self)
- get_shape(self)
- getcol(self, j)
Returns a copy of column j of the matrix, as an (m x 1) sparse matrix (column vector).
- getdata(self, num)
- getformat(self)
- getmaxprint(self)
- getnnz(self)
- getnzmax(self)
- getrow(self, i)
Returns a copy of row i of the matrix, as a (1 x n) sparse matrix (row vector).
- listprint(self, start, stop)
Provides a way to print over a single index.
- matmat(self, other)
- matvec(self, other)
Multiplies the sparse matrix by the vector 'other', returning a dense vector as a result.
- mean(self, axis = None)
Average the matrix over the given axis. If the axis is None, average over both rows and columns, returning a scalar.
- reshape(self, shape)
- rmatvec(self, other, conjugate = True)
Multiplies the vector 'other' by the sparse matrix, returning a dense vector as a result.
- If 'conjugate' is True:
- returns A.transpose().conj() * other
- Otherwise:
- returns A.transpose() * other.
- rowcol(self, num)
- save(self, file_name, format = """%d %d %f
""")
- set_shape(self, shape)
- setdiag(self, values, k = 0)
Fills the diagonal elements {a_ii} with the values from the given sequence. If k != 0, fills the off-diagonal elements {a_{i,i+k}} instead.
values may have any length. If the diagonal is longer than values, then the remaining diagonal entries will not be set. If values if longer than the diagonal, then the remaining values are ignored.
- sum(self, axis = None)
Sum the matrix over the given axis. If the axis is None, sum over both rows and columns, returning a scalar.
- toarray(self)
- tocoo(self)
- todense(self)
- toself(self, copy = False)
- transpose(self)
