SciPy

scipy.sparse.spmatrix.get_shape

spmatrix.get_shape()[source]