[Git][debian-gis-team/trollimage][master] Add upstream patch to fix FTBFS with Numpy 1.24. (closes: #1027204)

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Mon Jan 9 08:49:44 GMT 2023



Bas Couwenberg pushed to branch master at Debian GIS Project / trollimage


Commits:
ec7598ff by Bas Couwenberg at 2023-01-09T09:49:30+01:00
Add upstream patch to fix FTBFS with Numpy 1.24. (closes: #1027204)

- - - - -


3 changed files:

- debian/changelog
- + debian/patches/0001-Remove-usage-of-deprecated-np.float.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -3,6 +3,8 @@ trollimage (1.19.0-2) UNRELEASED; urgency=medium
   * Team upload.
   * Enable numpy3 dh helper.
   * Enable Salsa CI.
+  * Add upstream patch to fix FTBFS with Numpy 1.24.
+    (closes: #1027204)
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 22 Dec 2022 14:04:50 +0100
 


=====================================
debian/patches/0001-Remove-usage-of-deprecated-np.float.patch
=====================================
@@ -0,0 +1,20 @@
+Description: Remove usage of deprecated np.float
+Author: Martin Raspaud <martin.raspaud at smhi.se>
+Origin: https://github.com/pytroll/trollimage/commit/a6e263d9153f1ece995eaa8bc86cd601c788e403
+Bug: https://github.com/pytroll/trollimage/pull/118
+Bug-Debian: https://bugs.debian.org/1027204
+
+--- a/trollimage/image.py
++++ b/trollimage/image.py
+@@ -1019,9 +1019,8 @@ class Image(object):
+         if isinstance(max_stretch, (list, tuple)):
+             max_stretch = max_stretch[ch_nb]
+ 
+-        if((not self.channels[ch_nb].mask.all()) and
+-                abs(max_stretch - min_stretch) > 0):
+-            stretched = self.channels[ch_nb].data.astype(np.float)
++        if((not self.channels[ch_nb].mask.all()) and abs(max_stretch - min_stretch) > 0):
++            stretched = self.channels[ch_nb].data.astype(float)
+             stretched -= min_stretch
+             stretched /= max_stretch - min_stretch
+             self.channels[ch_nb] = np.ma.array(stretched,


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 0001-No-display.patch
 0002-Install-tests.patch
+0001-Remove-usage-of-deprecated-np.float.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/trollimage/-/commit/ec7598ff953980d986f9874169db9d77dc3b222b

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/trollimage/-/commit/ec7598ff953980d986f9874169db9d77dc3b222b
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20230109/95362fe3/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list