Skip to content

Commit

Permalink
BUG: Use isclose for comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
jwboth committed Dec 19, 2023
1 parent 30b80d1 commit 9da8ddd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/darsia/image/coordinatesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,8 @@ def check_equal_coordinatesystems(
if not exclude_size:
voxel_size_equal = True
for axis in coordinatesystem1.axes:
voxel_size_equal = (
voxel_size_equal
and coordinatesystem1.voxel_size[axis]
== coordinatesystem2.voxel_size[axis]
voxel_size_equal = voxel_size_equal and np.isclose(
coordinatesystem1.voxel_size[axis], coordinatesystem2.voxel_size[axis]
)
if not voxel_size_equal:
failure_log.append("voxel_size")
Expand Down

0 comments on commit 9da8ddd

Please sign in to comment.