csc_matrix

class sharpy.linear.src.libsparse.csc_matrix(arg1, shape=None, dtype=None, copy=False)[source]

Wrapper of scipy.csc_matrix that ensures best compatibility with numpy.ndarray. The following methods have been overwritten to ensure that numpy.ndarray are returned instead of numpy.matrixlib.defmatrix.matrix.

  • todense
  • _add_dense

Warning: this format is memory inefficient to allocate new sparse matrices. Consider using: - scipy.sparse.lil_matrix, which supports slicing, or - scipy.sparse.coo_matrix, though slicing is not supported :(

todense()[source]

As per scipy.spmatrix.todense but returns a numpy.ndarray.