sparse_utils#
Includes utility functions for sparse matrix operations.
Functions:
-
product_sparsity_pattern_dsdbsparse–Computes the sparsity pattern of the product of a sequence of DSDBSparse matrices.
product_sparsity_pattern_dsdbsparse
#
product_sparsity_pattern_dsdbsparse(*matrices: DSDBSparse, in_num_diag: int = 3, out_num_diag: int = None, start_block: int = 0, end_block: int = None, spillover: bool = False) -> tuple[NDArray, NDArray]
Computes the sparsity pattern of the product of a sequence of DSDBSparse matrices.
NOTE: the enough boundary layers need to be periodic for this to be correct.#
Parameters:
-
matrices(spmatrix, default:()) –A sequence of sparse matrices.
Returns:
-
rows(NDArray) –The row indices of the sparsity pattern.
-
cols(NDArray) –The column indices of the sparsity pattern.