scipy.sparse.isspmatrix_lil

scipy.sparse.isspmatrix_lil(x)[source]

Is x of lil_matrix type?

Parameters
x

object to check for being a lil matrix

Returns
bool

True if x is a lil matrix, False otherwise

Examples

>>> from scipy.sparse import lil_matrix, isspmatrix_lil
>>> isspmatrix_lil(lil_matrix([[5]]))
True
>>> from scipy.sparse import lil_matrix, csr_matrix, isspmatrix_lil
>>> isspmatrix_lil(csr_matrix([[5]]))
False