Group :: Development/Python3
RPM: python3-module-scikit-image
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: scikit-image-upstream-fix-1.patch
Download
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