sparse.spfuncs

Functions that operate on sparse matrices

Module Contents

Functions

extract_diagonal(A)
estimate_blocksize(A,efficiency=0.7) Attempt to determine the blocksize of a sparse matrix
count_blocks(A,blocksize) For a given blocksize=(r,c) count the number of occupied
extract_diagonal(A)
estimate_blocksize(A, efficiency=0.7)

Attempt to determine the blocksize of a sparse matrix

Returns a blocksize=(r,c) such that
  • A.nnz / A.tobsr( (r,c) ).nnz > efficiency
count_blocks(A, blocksize)

For a given blocksize=(r,c) count the number of occupied blocks in a sparse matrix A