pub fn assert_stochastic<F>(
matrix: &ArrayView2<'_, F>,
name: &str,
tolerance: F,
) -> CoreResult<()>Expand description
Assert that a 2-D matrix is (row-)stochastic: each row sums to 1 within tolerance, and all elements are non-negative.