Sparse array utils

libertem.common.sparse.assert_sparse(a) SparseArray[source]
libertem.common.sparse.is_sparse(a)[source]
libertem.common.sparse.sparse_to_coo(a, shape: Shape | tuple[int, ...] | None = None)[source]
libertem.common.sparse.to_dense(a)[source]
libertem.common.sparse.to_sparse(a, shape: Shape | tuple[int, ...] | None = None)[source]