symmray.sparse.sparse_vector¶
Sparse backend block vector class.
Classes¶
Class for storing block vectors with sparse storage, e.g. for the |
Module Contents¶
- class symmray.sparse.sparse_vector.BlockVector(blocks)[source]¶
Bases:
symmray.sparse.sparse_data_common.BlockCommon,symmray.vector_common.VectorCommon,symmray.common.SymmrayCommonClass for storing block vectors with sparse storage, e.g. for the singular- or eigen- values of a matrix.
This is equivalent to the diagonal of a zero charge abelian matrix.
- Parameters:
blocks (dict) – A dictionary mapping sector keys to array blocks.
- __slots__ = ('_blocks',)¶
- ndim = 1¶
- property size¶
The total size of all elements in the vector.
- property shape¶
Get the effective shape of the vector.