tacco.utils.coo_tocsr_inplace

coo_tocsr_inplace(A)[source]

Converts a sparse matrix in coo format into a sparse matrix in csr format without allocating huge temporaries by reusing the memory of the input coo matrix. This is however slower than the out-of-place scipy version. For an alternative using buffering on the harddisc, see coo_tocsr_buffered().

Parameters:

A – A coo_matrix. As side effect the matrix gets index sorted, without changing the integrity of the matrix.

Returns:

Returns a csr_matrix which shares memory with the input coo matrix.