From e000645bea7492c9f5277722c0ada7e1ee0b4833 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 14 Aug 2024 11:06:13 +0100 Subject: gentoo auto-resync : 14:08:2024 - 11:06:13 --- .../imageio/files/imageio-2.34.1-numpy-2.patch | 36 ---------------------- 1 file changed, 36 deletions(-) delete mode 100644 dev-python/imageio/files/imageio-2.34.1-numpy-2.patch (limited to 'dev-python/imageio/files') diff --git a/dev-python/imageio/files/imageio-2.34.1-numpy-2.patch b/dev-python/imageio/files/imageio-2.34.1-numpy-2.patch deleted file mode 100644 index c5c8288da471..000000000000 --- a/dev-python/imageio/files/imageio-2.34.1-numpy-2.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 511ad9b3705fc09d4654d69e42bbafef97bcb0a8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Sebastian=20Wallk=C3=B6tter?= -Date: Sat, 22 Jun 2024 14:56:11 +0200 -Subject: [PATCH] support numpy 2.0 - ---- - imageio/core/util.py | 2 ++ - imageio/plugins/_dicom.py | 2 +- - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/imageio/core/util.py b/imageio/core/util.py -index 6b2830421..bfb7e9fe9 100644 ---- a/imageio/core/util.py -+++ b/imageio/core/util.py -@@ -163,6 +163,8 @@ def __array_wrap__(self, out, context=None): - return out.dtype.type(out) # Scalar - elif out.shape != self.shape: - return out.view(type=np.ndarray) -+ elif not isinstance(out, Array): -+ return Array(out, self.meta) - else: - return out # Type Array - -diff --git a/imageio/plugins/_dicom.py b/imageio/plugins/_dicom.py -index 96fb6fcde..2f2f7ac51 100644 ---- a/imageio/plugins/_dicom.py -+++ b/imageio/plugins/_dicom.py -@@ -531,7 +531,7 @@ def _apply_slope_and_offset(self, data): - data = data.astype(np.float32) - else: - # Determine required range -- minReq, maxReq = data.min(), data.max() -+ minReq, maxReq = data.min().item(), data.max().item() - minReq = min([minReq, minReq * slope + offset, maxReq * slope + offset]) - maxReq = max([maxReq, minReq * slope + offset, maxReq * slope + offset]) - -- cgit v1.2.3