dgl.sparse.SparseMatrix.nnzΒΆ

property SparseMatrix.nnzΒΆ

Returns the number of non-zero elements in the sparse matrix.

Returns

The number of non-zero elements of the matrix

Return type

int