Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37704413
en ru br
ALT Linux repos
S:0.19.3-alt2

Group :: Development/Python3
RPM: python3-module-scikit-image

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: scikit-image-upstream-fix-1.patch
Download


From fd24648614ce9ccb7e568e6f606bd6bcb6834a4a Mon Sep 17 00:00:00 2001
From: Riadh Fezzani <rfezzani@gmail.com>
Date: Thu, 21 May 2020 08:14:15 +0200
Subject: [PATCH] Fix CI failures related to conversion of np.floating to dtype
 (#4731)
* Prevent type conversion to np.floating
* Fix conversion to np.floating
---
 skimage/util/dtype.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/skimage/util/dtype.py b/skimage/util/dtype.py
index d76fb2c5d..47dc0a814 100644
--- a/skimage/util/dtype.py
+++ b/skimage/util/dtype.py
@@ -223,7 +223,10 @@ def _convert(image, dtype, force_copy=False, uniform=False):
     """
     image = np.asarray(image)
     dtypeobj_in = image.dtype
-    dtypeobj_out = np.dtype(dtype)
+    if dtype is np.floating:
+        dtypeobj_out = np.dtype('float64')
+    else:
+        dtypeobj_out = np.dtype(dtype)
     dtype_in = dtypeobj_in.type
     dtype_out = dtypeobj_out.type
     kind_in = dtypeobj_in.kind
-- 
2.25.4
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin