import scipy.sparse as sp
import pyamg
%matplotlib inline
A = pyamg.gallery.sprand(10,10,30.0/100)
A = A.tocsr()
print(A.data.shape)
print(A.indices.shape)
print(A.indptr.shape)
print(A.data.nbytes)
print(A.indices.nbytes)
print(A.indptr.nbytes)
A = A.tocoo()
print(A.data.nbytes)
print(A.row.nbytes)
print(A.col.nbytes)
print(A.nnz)
A = A.todia()
print(A.nnz)
print(A.offsets)
print(A.data.nbytes)
print(A.offsets.nbytes)
print(A.data)
plt.spy(A, marker='.', markersize=5)