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 method.

  • "cov": covariance method.

Default is "naive".

copybool, optional

If True, a copy of mat is stored internally. Otherwise, a reference is stored instead. Default is False.

n_threadsint, optional

Number of threads. Default is 1.

Returns:
wrap

Wrapper matrix object.