Hi all, from scipy import * A = sparse.dok_matrix() for i in range(3): A[i,i] = 0.0+0.0j # A[i,i] = 0.1+0.0j n,m = A.shape print n,m print A n, m should be equal to 3, but this is only valid for non-zero entries. Am I missing something ? Nils