Skip to main content

Module convert

Module convert 

Source
Expand description

Format conversion routines between sparse matrix formats.

These functions convert between CSR, CSC, COO, BSR, and ELL formats. Currently conversions are performed via host-side download/upload; future versions will use GPU kernels for large matrices.

For simple conversions (CSR <-> COO, CSR <-> CSC), use the to_* methods on the individual format types directly. This module provides additional conversions that require more complex logic.

Functionsยง

coo_to_csc
Converts a COO matrix to CSC format.
coo_to_csr
Converts a COO matrix to CSR format.
csc_to_csr
Converts a CSC matrix to CSR format.
csr_to_bsr
Converts a CSR matrix to BSR format with the specified block dimension.
csr_to_csc
Converts a CSR matrix to CSC format.
csr_to_ell
Converts a CSR matrix to ELL format.