SparseMatrix
- class odl.core.sparse.sparse_matrix.SparseMatrix(format: str, impl: str, *args, **kwargs)[source]
Bases:
objectSparseMatrix is the ODL interface to the sparse Matrix supports in different backends.
Note: The user is responsible for using the *args and **kwargs expected by the respective backends: Pytorch:
Examples: SparseMatrix(‘COO’, ‘pytorch’,
[[0, 1, 1],[2, 0, 2]], [3, 4, 5], device=’cuda:0’)
- SparseMatrix(‘COO’, ‘scipy’,
(3, 4))
- __init__()