diff --git a/lensless/hardware/sensor.py b/lensless/hardware/sensor.py index 08d8fa46..9ef4bb82 100644 --- a/lensless/hardware/sensor.py +++ b/lensless/hardware/sensor.py @@ -319,7 +319,7 @@ def downsample(self, factor): self.pixel_size = self.pixel_size * factor self.pitch = self.pitch * factor - self.resolution = (self.resolution / factor).astype(int) + self.resolution = np.round(self.resolution / factor).astype(int) self.size = self.pixel_size * self.resolution self.image_shape = self.resolution if self.color: