brainunit.sparse module

brainunit.sparse module#

Sparse Data Structures#

SparseMatrix

Base class for sparse matrices in saiunit.

CSR

Unit-aware Compressed Sparse Row (CSR) matrix.

CSC

Unit-aware Compressed Sparse Column (CSC) matrix.

COO

Unit-aware Coordinate (COO) sparse matrix.

Sparse Data Operations#

csr_todense

Convert a CSR-format sparse matrix to a dense matrix.

csr_fromdense

Create a CSR-format sparse matrix from a dense matrix.

csc_todense

Convert a CSC-format sparse matrix to a dense matrix.

csc_fromdense

Create a CSC-format sparse matrix from a dense matrix.

coo_todense

Convert a COO-format sparse matrix to a dense matrix.

coo_fromdense

Create a COO-format sparse matrix from a dense matrix.