SciPy

scipy.sparse.lil_matrix.shape

lil_matrix.shape

Get shape of a matrix.