Skip to main content

sparse_eye_rect

Function sparse_eye_rect 

Source
pub fn sparse_eye_rect<T>(m: usize, n: usize) -> SparseResult<CsrArray<T>>
where T: Float + SparseElement + Div<Output = T> + 'static,
Expand description

Create a rectangular sparse identity-like matrix of size m x n in CSR format.

Places 1s on the main diagonal (the first min(m, n) diagonal entries).

ยงArguments

  • m - Number of rows
  • n - Number of columns