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:

spindex

See also

  • sparray() Create a sparse array from a dense matrix

  • spmatrix() Create a dense matrix from a sparse array