From 1e6abb5278a2917e94cc1b3e26d426517c6f4d76 Mon Sep 17 00:00:00 2001 From: Najib Ishaq Date: Fri, 22 Dec 2023 17:28:35 -0500 Subject: [PATCH] fix: casting original images to numpy.float32 --- .../transforms/images/apply_flatfield/apply_flatfield.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transforms/images/apply-flatfield-plugin/src/polus/plugins/transforms/images/apply_flatfield/apply_flatfield.py b/transforms/images/apply-flatfield-plugin/src/polus/plugins/transforms/images/apply_flatfield/apply_flatfield.py index d139430b2..40e895a1c 100644 --- a/transforms/images/apply-flatfield-plugin/src/polus/plugins/transforms/images/apply_flatfield/apply_flatfield.py +++ b/transforms/images/apply-flatfield-plugin/src/polus/plugins/transforms/images/apply_flatfield/apply_flatfield.py @@ -156,7 +156,7 @@ def _unshade_batch( images = [f.result() for f in load_futures] images = [img for _, img in sorted(images, key=operator.itemgetter(0))] - img_stack = numpy.stack(images, axis=0) + img_stack = numpy.stack(images, axis=0).astype(numpy.float32) # Apply flatfield correction if df_image is not None: