scipy.sparse.isspmatrix_dia#
- scipy.sparse.isspmatrix_dia(x)[source]#
Is x of dia_matrix type?
- Parameters:
- x
object to check for being a dia matrix
- Returns:
- bool
True if x is a dia matrix, False otherwise
Examples
>>> from scipy.sparse import dia_array, dia_matrix, coo_matrix, isspmatrix_dia >>> isspmatrix_dia(dia_matrix([[5]])) True >>> isspmatrix_dia(dia_array([[5]])) False >>> isspmatrix_dia(coo_matrix([[5]])) False