diff --git a/pineappl/src/packed_array.rs b/pineappl/src/packed_array.rs index 7458475f..bbb3ec3a 100644 --- a/pineappl/src/packed_array.rs +++ b/pineappl/src/packed_array.rs @@ -141,7 +141,7 @@ impl Index<[usize; D]> for Packed type Output = T; fn index(&self, index: [usize; D]) -> &Self::Output { - debug_assert_eq!(index.len(), self.shape.len()); + assert_eq!(index.len(), self.shape.len()); assert!( index.iter().zip(self.shape.iter()).all(|(&i, &d)| i < d), "index {:?} is out of bounds for array of shape {:?}", @@ -176,7 +176,7 @@ impl IndexMut<[usize; D]> for PackedArray { fn index_mut(&mut self, index: [usize; D]) -> &mut Self::Output { - debug_assert_eq!(index.len(), self.shape.len()); + assert_eq!(index.len(), self.shape.len()); assert!( index.iter().zip(self.shape.iter()).all(|(&i, &d)| i < d), "index {:?} is out of bounds for array of shape {:?}",