SciPy

scipy.sparse.isspmatrix_bsr

scipy.sparse.isspmatrix_bsr(x)[source]

Is x of a bsr_matrix type?

Parameters:
x

object to check for being a bsr matrix

Returns:
bool

True if x is a bsr matrix, False otherwise

Examples

>>> from scipy.sparse import bsr_matrix, isspmatrix_bsr
>>> isspmatrix_bsr(bsr_matrix([[5]]))
True
>>> from scipy.sparse import bsr_matrix, csr_matrix, isspmatrix_bsr
>>> isspmatrix_bsr(csr_matrix([[5]]))
False

Previous topic

scipy.sparse.isspmatrix_csr

Next topic

scipy.sparse.isspmatrix_lil