Skip to content

Commit

Permalink
Relaxed type check of input array, to allow da.core.Array sub-classes…
Browse files Browse the repository at this point in the history
… (e. g. ResourceBackedDaskArray)
  • Loading branch information
sommerc committed Apr 22, 2024
1 parent b23b615 commit e4d3c6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dask_image/ndinterp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e4d3c6e

Please sign in to comment.