cuspa.tl.CSRMatrix#
- class cuspa.tl.CSRMatrix( )#
CSR matrix backed by CuPy, CUDA PyTorch, or NumPy arrays.
indptrandindicesshare one dtype:int32, orint64when the matrix has more than2**31 - 1non-zeros.datais alwaysint32.
Attributes
Methods
|
Wrap as |
|
Wrap as a |
- CSRMatrix.nnz#
- CSRMatrix.to_cupy_csr(dtype: Any = 'float32') Any#
Wrap as
cupyx.scipy.sparse.csr_matrix.cupyx.scipy.sparseonly supports float and complex data. Counts are cast todtype, which defaults tofloat32.cupyx.scipy.sparsealso only supportsint32indices, so this raisesOverflowErrorfor a matrix with more than2**31 - 1non-zeros. Useto_torch_sparse()or the arrays directly instead.