scipy.sparse
dia_matrix.
shape
Get shape of a matrix.
scipy.sparse.dia_matrix
scipy.sparse.dia_matrix.nnz