scipy.sparse.isspmatrix_dok#

scipy.sparse.isspmatrix_dok(x)[source]#

Is x of dok_array type?

Parameters:
x

object to check for being a dok matrix

Returns:
bool

True if x is a dok matrix, False otherwise

Examples

>>> from scipy.sparse import dok_array, dok_matrix, coo_matrix, isspmatrix_dok
>>> isspmatrix_dok(dok_matrix([[5]]))
True
>>> isspmatrix_dok(dok_array([[5]]))
False
>>> isspmatrix_dok(coo_matrix([[5]]))
False