`); SciPySciPy Installing User Guide API reference Building from source Development Release notes GitHubGitHub TwitterTwitter Installing User Guide API reference Building from source Development Release notes GitHubGitHub TwitterTwitterSection Navigationscipyscipy.clusterscipy.constantsscipy.datasetsscipy.differentiatescipy.fftscipy.fftpackscipy.integratescipy.interpolatescipy.ioscipy.linalgscipy.ndimagescipy.odrscipy.optimizescipy.signalscipy.sparsescipy.spatialscipy.specialscipy..." />`); SciPySciPy Installing User Guide API reference Building from source Development Release notes GitHubGitHub TwitterTwitter Installing User Guide API reference Building from source Development Release notes GitHubGitHub TwitterTwitterSection Navigationscipyscipy.clusterscipy.constantsscipy.datasetsscipy.differentiatescipy.fftscipy.fftpackscipy.integratescipy.interpolatescipy.ioscipy.linalgscipy.ndimagescipy.odrscipy.optimizescipy.signalscipy.sparsescipy.spatialscipy.specialscipy..." /> isspmatrix_lil — SciPy v1.15.3 Manual
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_array, lil_matrix, coo_matrix, isspmatrix_lil
>>> isspmatrix_lil(lil_matrix([[5]]))
True
>>> isspmatrix_lil(lil_array([[5]]))
False
>>> isspmatrix_lil(coo_matrix([[5]]))
False