prtools.spindex#
- class spindex(row, col, shape, nnz=None)[source]#
Sparse coordinate list (COO) index
- Parameters:
row (array_like) – List of row indices which contain nonzero data
col (array_like) – List of column indices which contain nonzero data
shape ((2,) array_like) – Dimensions of dense matrix
nnz (int, optional) – Number of nonzero entries in dense matrix. If not specified,
- Return type:
See also
sparray()
Create a sparse array from a dense matrixspmatrix()
Create a dense matrix from a sparse array