1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
From: Ole Streicher <olebole@debian.org>
Date: Wed, 19 Nov 2025 20:09:48 +0100
Subject: Remove dependency from dask_image
dask_image is not packaged for Debian yet.
---
reproject/array_utils.py | 7 +++++--
reproject/interpolation/core.py | 2 +-
reproject/tests/test_array_utils.py | 10 ----------
3 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/reproject/array_utils.py b/reproject/array_utils.py
index 3e91662..f6826c6 100644
--- a/reproject/array_utils.py
+++ b/reproject/array_utils.py
@@ -1,6 +1,9 @@
import numpy as np
-from dask_image.ndinterp import map_coordinates as dask_image_map_coordinates
-from dask_image.ndinterp import spline_filter
+try:
+ from dask_image.ndinterp import map_coordinates as dask_image_map_coordinates
+ from dask_image.ndinterp import spline_filter
+except ModuleNotFoundError:
+ pass
from scipy.ndimage import spline_filter as scipy_spline_filter
__all__ = ["map_coordinates", "dask_map_coordinates", "sample_array_edges", "ArrayWrapper"]
diff --git a/reproject/interpolation/core.py b/reproject/interpolation/core.py
index 72ddd17..f2a63e0 100644
--- a/reproject/interpolation/core.py
+++ b/reproject/interpolation/core.py
@@ -121,7 +121,7 @@ def _reproject_full(
# computed transformation each time
for i in range(len(array)):
# Interpolate array on to the pixels coordinates in pixel_in
- if is_dask_array:
+ if is_dask_array and False:
dask_map_coordinates(
array[i],
pixel_in,
diff --git a/reproject/tests/test_array_utils.py b/reproject/tests/test_array_utils.py
index dbb1f8c..e4556e0 100644
--- a/reproject/tests/test_array_utils.py
+++ b/reproject/tests/test_array_utils.py
@@ -45,13 +45,3 @@ def test_custom_map_coordinates(cval, shape, order, dtype):
# subtly different results, so no point in comparing this.
if order < 2:
assert_allclose(result1, expected)
-
- result2 = dask_map_coordinates(
- data,
- coords,
- order=order,
- cval=cval,
- mode="constant",
- )
-
- assert_allclose(result1, result2)
|