sparse_format

paminco.utils.typing.sparse_format(M: scipy.sparse.base.spmatrix, return_as: str) scipy.sparse.base.spmatrix[source]

Change format of sparse matrix M.

Parameters
Mspmatrix

Sparse scipy matrix.

return_asstr

Return type.

Returns
spmatrix

Sparse matrix in return_as format.