diff --git a/iohub/ngff/nodes.py b/iohub/ngff/nodes.py index 8089a21..f05adbc 100644 --- a/iohub/ngff/nodes.py +++ b/iohub/ngff/nodes.py @@ -1060,7 +1060,7 @@ def get_effective_scale( if transform.type == "scale": full_scale *= np.array(transform.scale) - return list(full_scale) + return [float(x) for x in full_scale] def get_effective_translation( self, @@ -1087,7 +1087,7 @@ def get_effective_translation( if transform.type == "translation": full_translation += np.array(transform.translation) - return list(full_translation) + return [float(x) for x in full_translation] def set_transform( self, diff --git a/tests/ngff/test_ngff.py b/tests/ngff/test_ngff.py index a9705f0..837c4dd 100644 --- a/tests/ngff/test_ngff.py +++ b/tests/ngff/test_ngff.py @@ -512,16 +512,16 @@ def test_set_transform_image(ch_shape_dtype, arr_name): ), ] target_scales = [ - (1.0, 1.0, 1.0, 1.0, 1.0), - (1.0, 2.0, 3.0, 4.0, 5.0), - (1.0, 1.0, 1.0, 1.0, 1.0), - (4.0, 4.0, 4.0, 4.0, 4.0), + [1.0, 1.0, 1.0, 1.0, 1.0], + [1.0, 2.0, 3.0, 4.0, 5.0], + [1.0, 1.0, 1.0, 1.0, 1.0], + [4.0, 4.0, 4.0, 4.0, 4.0], ] target_translations = [ - (0.0, 0.0, 0.0, 0.0, 0.0), - (0.0, 0.0, 0.0, 0.0, 0.0), - (1.0, 2.0, 3.0, 4.0, 5.0), - (2.0, 2.0, 2.0, 2.0, 2.0), + [0.0, 0.0, 0.0, 0.0, 0.0], + [0.0, 0.0, 0.0, 0.0, 0.0], + [1.0, 2.0, 3.0, 4.0, 5.0], + [2.0, 2.0, 2.0, 2.0, 2.0], ]