From bc39edb617c0b7ae52ae2b2d4773baf21364d076 Mon Sep 17 00:00:00 2001 From: Genevieve Buckley <30920819+GenevieveBuckley@users.noreply.github.com> Date: Fri, 30 Jul 2021 05:25:18 +1000 Subject: [PATCH] Upgrade for compatibility with latest dask release (#241) --- dask_image/ndmeasure/_utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_image/ndmeasure/_utils/__init__.py b/dask_image/ndmeasure/_utils/__init__.py index 4f84368b..1e7a1f0d 100644 --- a/dask_image/ndmeasure/_utils/__init__.py +++ b/dask_image/ndmeasure/_utils/__init__.py @@ -22,10 +22,10 @@ def _norm_input_labels_index(image, label_image=None, index=None): label_image = da.ones( image.shape, dtype=int, chunks=image.chunks, ) - index = da.ones(tuple(), dtype=int, chunks=tuple()) + index = da.from_array(np.array(1, dtype=int)) elif index is None: label_image = (label_image > 0).astype(int) - index = da.ones(tuple(), dtype=int, chunks=tuple()) + index = da.from_array(np.array(1, dtype=int)) label_image = da.asarray(label_image) index = da.asarray(index)