from scipy import sparse
import numpy as np
IA = np.array([1,2,3,1,4,0,4,2])
JA = np.array([1,3,4,2,5,0,4,1])
V = np.array([1,2,5,2,4,7,6,2], dtype=float)
A = sparse.coo_matrix((V,(IA,JA)),shape=(5,6))
print(A)
print(A.todense())
print(A.nnz)
print(A.data.nbytes)
print(A.row.nbytes)
print(A.col.nbytes)