Module utils

Source
Expand description

Utility functions for sparse matrices

This module provides utility functions for sparse matrices.

Functionsยง

density
Calculate the density of a sparse matrix
diag
Create a diagonal matrix in CSR format
identity
Create an identity matrix in CSR format
is_symmetric
Check if a sparse matrix is symmetric
random
Generate a random sparse matrix with given density
sparsity_pattern
Calculate the sparsity pattern of a matrix