Skip to main content

trace

Function trace 

Source
pub fn trace(matrix: &ArrayView2<'_, f64>) -> Result<f64, String>
Expand description

Real matrix trace: sum of the diagonal entries (dimension-correct for any min(rows, cols)-length diagonal, not just 2x2).