Skip to content

Commit

Permalink
Fix divide by zero RuntimeWarning because of zero binning
Browse files Browse the repository at this point in the history
See #11
  • Loading branch information
gmazzamuto committed Aug 24, 2021
1 parent b770e12 commit 9eced0d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dcimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ def _parse_header(self):
if binning_x != binning_y:
raise ValueError('different binning in X and Y')

self.binning = binning_x
if binning_x > 0:
self.binning = binning_x

if self.byte_depth != 1 and self.byte_depth != 2:
raise ValueError(
Expand Down

0 comments on commit 9eced0d

Please sign in to comment.