From 8d494c5b307a721f456452c82ceb5a52283e5d82 Mon Sep 17 00:00:00 2001 From: Nikita Moshkov Date: Tue, 9 Feb 2021 15:07:17 +0100 Subject: [PATCH] Update cropping.py https://github.com/cytomining/DeepProfiler/issues/254 --- deepprofiler/imaging/cropping.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepprofiler/imaging/cropping.py b/deepprofiler/imaging/cropping.py index 5ae14fd..a9e6f81 100644 --- a/deepprofiler/imaging/cropping.py +++ b/deepprofiler/imaging/cropping.py @@ -41,7 +41,7 @@ def unfold_channels(crop, mode=0): def fold_channels(crop): # Expected input image shape: (h, w * c), with h = w # Output image shape: (h, w, c), with h = w - output = np.reshape(crop, (crop.shape[0], crop.shape[0], -1), order="F") + output = np.reshape(crop, (crop.shape[0], crop.shape[0], -1), order="F").astype(np.float) for i in range(output.shape[-1]): mean = np.mean(output[:,:,i]) std = np.std(output[:,:,i])