1function e = nnz (G)
2%NNZ the number of nonzeros in a matrix.
3% e = nnz (G) is the number of nonzeros in a GraphBLAS matrix G.  A
4% GraphBLAS matrix G may have explicit zero entries, but these are
5% excluded from the count e.  Thus, nnz (G) <= GrB.entries (G).
6%
7% See also GrB.entries, GrB.prune, GrB/nonzeros, GrB/size, GrB/numel.
8
9% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
10% SPDX-License-Identifier: GPL-3.0-or-later
11
12G = G.opaque ;
13e = gb_nnz (G) ;
14
15