SciPy

scipy.sparse.coo_matrix.shape

coo_matrix.shape

Get shape of a matrix.