From 9da8ddded24d3be1dfe7c45d04afb75df86e7b8d Mon Sep 17 00:00:00 2001 From: Jakub Both Date: Tue, 19 Dec 2023 22:53:00 +0100 Subject: [PATCH] BUG: Use isclose for comparison --- src/darsia/image/coordinatesystem.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/darsia/image/coordinatesystem.py b/src/darsia/image/coordinatesystem.py index dce6dfa9..ce2698c0 100644 --- a/src/darsia/image/coordinatesystem.py +++ b/src/darsia/image/coordinatesystem.py @@ -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")