fromMatrix

Creates a sparse matrix from a dense matrix.

Return

A sparse matrix representation of the input matrix.

Parameters

matrix

The dense matrix to convert.