Function nnz_by_reference

Source
pub fn nnz_by_reference(matrix: &mut Array) -> INT
Expand description

Returns the number of non-zero elements in a matrix, passed by reference.

let matrix = ones(4, 6);
let n = nnz(matrix);
assert_eq(n, 24);
let matrix = eye(4);
let n = nnz(matrix);
assert_eq(n, 4);