From: Jerome Kieffer <jerome.kieffer@esrf.fr>
Date: Wed, 3 Sep 2025 14:29:13 +0200
Subject: work-around for bug https://github.com/numpy/numpy/issues/29663

Origin: upstream, https://github.com/kif/fabio/commit/5a190effb41ab0025d38bf806747b797f5d91d3b
Bug: https://github.com/numpy/numpy/issues/29663
Bug-Debian: https://bugs.debian.org/1114715
Last-Update: 2025-10-13
---
 src/fabio/test/test_fabio_image.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/fabio/test/test_fabio_image.py b/src/fabio/test/test_fabio_image.py
index 1d77a20..0cc2a6c 100644
--- a/src/fabio/test/test_fabio_image.py
+++ b/src/fabio/test/test_fabio_image.py
@@ -233,8 +233,8 @@ class TestPilImage2(TestPilImage):
         if numpy.issubdtype(typ, numpy.integer):
             maxi = numpy.iinfo(typ).max
         else:
-            maxi = numpy.iinfo(numpy.integer).max
-        return (numpy.random.random(shape) * maxi / 10).astype(typ)
+            maxi = numpy.iinfo(int).max
+        return (numpy.random.random(shape) * (0.1 * maxi)).astype(typ)
 
 
 class TestPilImage3(TestPilImage):
@@ -245,8 +245,8 @@ class TestPilImage3(TestPilImage):
         if numpy.issubdtype(typ, numpy.integer):
             maxi = numpy.iinfo(typ).max
         else:
-            maxi = numpy.iinfo(numpy.integer).max
-        return ((numpy.random.random(shape) - 0.5) * maxi / 10).astype(typ)
+            maxi = numpy.iinfo(int).max
+        return ((numpy.random.random(shape) - 0.5) * (0.1 * maxi)).astype(typ)
 
 
 class TestDeprecatedFabioImage(unittest.TestCase):
