hdmf.common.sparse module

class hdmf.common.sparse.CSRMatrix(data, indices=None, indptr=None, shape=None, name='csr_matrix')

Bases: hdmf.container.Container

Parameters:
  • data (csr_matrix or ndarray or Dataset) – the data to use for this CSRMatrix or CSR data array.If passing CSR data array, indices, indptr, and shape must also be provided
  • indices (ndarray or Dataset) – CSR index array
  • indptr (ndarray or Dataset) – CSR index pointer array
  • shape (list or tuple or ndarray) – the shape of the matrix
  • name (str) – the name to use for this when storing
to_spmat()
data_type = 'CSRMatrix'
namespace = 'hdmf-common'