diff --git a/nalgebra-sparse/src/csc.rs b/nalgebra-sparse/src/csc.rs index de4af43d6..34abc6fca 100644 --- a/nalgebra-sparse/src/csc.rs +++ b/nalgebra-sparse/src/csc.rs @@ -356,7 +356,7 @@ impl CscMatrix { #[inline] #[must_use] pub fn col(&self, index: usize) -> CscCol<'_, T> { - self.get_col(index).expect("Row index must be in bounds") + self.get_col(index).expect("Column index must be in bounds") } /// Mutable column access for the given column index. @@ -367,7 +367,7 @@ impl CscMatrix { #[inline] pub fn col_mut(&mut self, index: usize) -> CscColMut<'_, T> { self.get_col_mut(index) - .expect("Row index must be in bounds") + .expect("Column index must be in bounds") } /// Return the column at the given column index, or `None` if out of bounds. diff --git a/nalgebra-sparse/src/factorization/cholesky.rs b/nalgebra-sparse/src/factorization/cholesky.rs index 18303a6cf..76f768a65 100644 --- a/nalgebra-sparse/src/factorization/cholesky.rs +++ b/nalgebra-sparse/src/factorization/cholesky.rs @@ -262,7 +262,7 @@ impl CscCholesky { /// /// # Panics /// - /// Panics if `B` is not square. + /// Panics if the number of rows of `B` differs from the dimension of the factorized matrix. #[must_use = "Did you mean to use solve_mut()?"] pub fn solve<'a>(&'a self, b: impl Into>) -> DMatrix { let b = b.into(); @@ -277,7 +277,7 @@ impl CscCholesky { /// /// # Panics /// - /// Panics if `b` is not square. + /// Panics if the number of rows of `B` differs from the dimension of the factorized matrix. pub fn solve_mut<'a>(&'a self, b: impl Into>) { let expect_msg = "If the Cholesky factorization succeeded,\ then the triangular solve should never fail";