Function identity
Source pub fn identity(n: usize) -> SparseResult<CsrMatrix<f64>>
Expand description
Create an identity matrix in CSR format
§Arguments
n
- Size of the matrix (n x n)
§Returns
- Identity matrix in CSR format
§Example
use scirs2_sparse::utils::identity;
let eye = identity(3).unwrap();