finesse.cymath.sparsemath module
Sparse matrix math tools.
- class finesse.cymath.sparsemath.CSRMatrix(ndarray[double complex,ndim=2])[source]
Bases:
objectA complex value Compressed Sparse Row (CSR) matrix. This is a useful format for storing a sparse matrix for fast matrix vector products.
This class wraps the csr_matrix structure which is pure C and so can be passed to functions that do not need the GIL.
Parameters
- Anp.ndarray[complex, ndim=2]
A dense matrix to convert into a sparse format