From e4d3c6e1cd9d0378c61c0750ecb9b5fceed89359 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Mon, 22 Apr 2024 14:07:41 +0200 Subject: [PATCH] Relaxed type check of input array, to allow da.core.Array sub-classes (e. g. ResourceBackedDaskArray) --- dask_image/ndinterp/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dask_image/ndinterp/__init__.py b/dask_image/ndinterp/__init__.py index 1d422005..9a6d294d 100644 --- a/dask_image/ndinterp/__init__.py +++ b/dask_image/ndinterp/__init__.py @@ -83,7 +83,7 @@ def affine_transform( """ - if not type(image) == da.core.Array: + if not isinstance(image, da.core.Array): image = da.from_array(image) if output_shape is None: @@ -328,7 +328,7 @@ def rotate( (724, 724) """ - if not type(input_arr) == da.core.Array: + if not isinstance(input_arr, da.core.Array): input_arr = da.from_array(input_arr) if output_chunks is None: @@ -434,7 +434,7 @@ def spline_filter( **kwargs ): - if not type(image) == da.core.Array: + if not isinstance(image, da.core.Array): image = da.from_array(image) # use dispatching mechanism to determine backend @@ -492,7 +492,7 @@ def spline_filter1d( **kwargs ): - if not type(image) == da.core.Array: + if not isinstance(image, da.core.Array): image = da.from_array(image) # use dispatching mechanism to determine backend