adelie.matrix.sparse#
- adelie.matrix.sparse(mat: csc_matrix | csr_matrix, *, method: str = 'naive', copy: bool = False, n_threads: int = 1)[source]#
Creates a viewer of a sparse matrix.
Note
Regardless of the storage order of the input matrix, we internally convert the matrix to CSC order for performance reasons.
- Parameters:
- matUnion[csc_matrix, csr_matrix]
The sparse matrix to view.
- methodstr, optional
Method type. It must be one of the following:
"naive"
: naive matrix."cov"
: covariance matrix."constraint"
: constraint matrix.
Default is
"naive"
.- copybool, optional
If
True
, a copy ofmat
is stored internally. Otherwise, a reference is stored instead. Default isFalse
.- n_threadsint, optional
Number of threads. Default is
1
.
- Returns:
- wrap
Wrapper matrix object.