[pyresample] 05/07: Drop 0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch

Antonio Valentino a_valentino-guest at moszumanska.debian.org
Fri Sep 15 06:13:24 UTC 2017


This is an automated email from the git hooks/post-receive script.

a_valentino-guest pushed a commit to branch master
in repository pyresample.

commit b44e1e5070847d47c8dae09d295e81b705d7171c
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date:   Fri Sep 15 06:01:16 2017 +0000

    Drop 0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch
    
    Applied upstream
---
 debian/changelog                                   |  3 -
 ...n-mask-array-usage-in-gaussian-resampling.patch | 71 ----------------------
 debian/patches/series                              |  1 -
 3 files changed, 75 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6b2001d..2c47349 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,9 +4,6 @@ pyresample (1.6.0-1) UNRELEASED; urgency=medium
   * debian/control
     - drop dependenct from python3 mock (use the stdlib version)
     - add dependency from six
-  * debian/patches
-    - new 0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch
-      (backported form upstream) fix compatibility with numpy 1.13
 
  -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 09 Sep 2017 09:36:20 +0000
 
diff --git a/debian/patches/0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch b/debian/patches/0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch
deleted file mode 100644
index 334f6ce..0000000
--- a/debian/patches/0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Sat, 9 Sep 2017 09:31:36 +0000
-Subject: Fix boolean mask array usage in gaussian resampling
-
-In numpy 1.13 it is illegal to index an array with a boolean
-array of a different size.
----
- pyresample/kd_tree.py           | 21 ++++++++++++++++-----
- pyresample/test/test_kd_tree.py | 10 ++++++----
- 2 files changed, 22 insertions(+), 9 deletions(-)
-
-diff --git a/pyresample/kd_tree.py b/pyresample/kd_tree.py
-index e08ca84..2f76b7b 100644
---- a/pyresample/kd_tree.py
-+++ b/pyresample/kd_tree.py
-@@ -807,11 +807,22 @@ def get_sample_from_neighbour_info(resample_type, output_shape, data,
- 
-             # Calculate final stddev
-             new_valid_index = (count > 1)
--            v1 = norm[new_valid_index]
--            v2 = norm_sqr[new_valid_index]
--            stddev[new_valid_index] = np.sqrt(
--                (v1 / (v1 ** 2 - v2)) * stddev[new_valid_index])
--            stddev[~new_valid_index] = np.NaN
-+            if stddev.ndim >= 2:
-+                # If given more than 1 input data array
-+                new_valid_index = new_valid_index[:, 0]
-+                for i in range(stddev.shape[-1]):
-+                    v1 = norm[new_valid_index, i]
-+                    v2 = norm_sqr[new_valid_index, i]
-+                    stddev[new_valid_index, i] = np.sqrt(
-+                        (v1 / (v1 ** 2 - v2)) * stddev[new_valid_index, i])
-+                    stddev[~new_valid_index, i] = np.NaN
-+            else:
-+                # If given single input data array
-+                v1 = norm[new_valid_index]
-+                v2 = norm_sqr[new_valid_index]
-+                stddev[new_valid_index] = np.sqrt(
-+                    (v1 / (v1 ** 2 - v2)) * stddev[new_valid_index])
-+                stddev[~new_valid_index] = np.NaN
- 
-         # Add fill values
-         result[np.invert(result_valid_index)] = fill_value
-diff --git a/pyresample/test/test_kd_tree.py b/pyresample/test/test_kd_tree.py
-index 80dbec0..eafc689 100644
---- a/pyresample/test/test_kd_tree.py
-+++ b/pyresample/test/test_kd_tree.py
-@@ -345,17 +345,19 @@ class Test(unittest.TestCase):
-             self.assertTrue(any(['Possible more' in str(
-                 x.message) for x in w]), 'Failed to create correct neighbour radius warning')
-         cross_sum = res.sum()
--        cross_sum_stddev = stddev.sum()
-         cross_sum_counts = counts.sum()
-         expected = 1461.84313918
--        expected_stddev = 0.446204424799
-+        expected_stddev = [0.446193170875, 0.443606880035, 0.438586349519]
-         expected_counts = 4934802.0
-         self.assertTrue(res.shape == stddev.shape and stddev.shape ==
-                         counts.shape and counts.shape == (800, 800, 3))
-         self.assertAlmostEqual(cross_sum, expected,
-                                msg='Swath multi channel resampling gauss failed on data')
--        self.assertAlmostEqual(cross_sum_stddev, expected_stddev,
--                               msg='Swath multi channel resampling gauss failed on stddev')
-+        for i, e_stddev in enumerate(expected_stddev):
-+            cross_sum_stddev = stddev[:, :, i].sum()
-+            print(cross_sum_stddev, e_stddev)
-+            self.assertAlmostEqual(cross_sum_stddev, e_stddev,
-+                                   msg='Swath multi channel resampling gauss failed on stddev (channel {})'.format(i))
-         self.assertAlmostEqual(cross_sum_counts, expected_counts,
-                                msg='Swath multi channel resampling gauss failed on counts')
- 
diff --git a/debian/patches/series b/debian/patches/series
index ebad94b..b939e25 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
 0001-fix-doc-build.patch
 0002-fix-proj4-initialization.patch
-0003-Fix-boolean-mask-array-usage-in-gaussian-resampling.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pyresample.git



More information about the Pkg-grass-devel mailing list