Skip to content

Commit

Permalink
fix(bbox): more robust get_slice rounding check
Browse files Browse the repository at this point in the history
  • Loading branch information
nkemnitz authored and dodamih committed Aug 1, 2023
1 parent 64ca248 commit 2b3dc9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zetta_utils/geometry/bbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ def get_slice(
else:
dim_res = resolution[dim]

dim_range_start_raw = self.bounds[dim][0] / dim_res
dim_range_end_raw = self.bounds[dim][1] / dim_res
dim_range_start_raw = round(self.bounds[dim][0] / dim_res, 10)
dim_range_end_raw = round(self.bounds[dim][1] / dim_res, 10)

if not round_to_int:
return slice(dim_range_start_raw, dim_range_end_raw)
Expand Down

0 comments on commit 2b3dc9f

Please sign in to comment.