SciPy

This is documentation for an old release of SciPy (version 1.6.2). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.sparse.isspmatrix_csc

scipy.sparse.isspmatrix_csc(x)[source]

Is x of csc_matrix type?

Parameters
x

object to check for being a csc matrix

Returns
bool

True if x is a csc matrix, False otherwise

Examples

>>>
>>> from scipy.sparse import csc_matrix, isspmatrix_csc
>>> isspmatrix_csc(csc_matrix([[5]]))
True
>>>
>>> from scipy.sparse import csc_matrix, csr_matrix, isspmatrix_csc
>>> isspmatrix_csc(csr_matrix([[5]]))
False

Previous topic

scipy.sparse.isspmatrix

Next topic

scipy.sparse.isspmatrix_csr