SciPy

scipy.sparse.lil_matrix.asformat

lil_matrix.asformat(self, format, copy=False)[source]

Return this matrix in the passed format.

Parameters
format{str, None}

The desired matrix format (“csr”, “csc”, “lil”, “dok”, “array”, …) or None for no conversion.

copybool, optional

If True, the result is guaranteed to not share data with self.

Returns
AThis matrix in the passed format.

Previous topic

scipy.sparse.lil_matrix

Next topic

scipy.sparse.lil_matrix.asfptype