diff --git a/src/base/matrix.rs b/src/base/matrix.rs index 95dda818..449d76cd 100644 --- a/src/base/matrix.rs +++ b/src/base/matrix.rs @@ -1350,12 +1350,11 @@ where S: Storage, { #[inline] - fn eq(&self, right: &Matrix) -> bool { - assert!( - self.shape() == right.shape(), - "Matrix equality test dimension mismatch." - ); - self.iter().zip(right.iter()).all(|(l, r)| l == r) + fn eq(&self, right: &Matrix) -> bool { + if self.shape() == right.shape() { + return self.iter().zip(right.iter()).all(|(l, r)| l == r) + } + false } }