From 6a059867ba084124002d6a4bcd46e71724ae6c7c Mon Sep 17 00:00:00 2001 From: walter Date: Fri, 10 Jun 2016 13:13:48 +0200 Subject: [PATCH] removed commented code lines; fused types work now. --- skimage/feature/_texture.pyx | 1 - skimage/feature/texture.py | 5 ----- 2 files changed, 6 deletions(-) diff --git a/skimage/feature/_texture.pyx b/skimage/feature/_texture.pyx index 0988a544..132e19b8 100644 --- a/skimage/feature/_texture.pyx +++ b/skimage/feature/_texture.pyx @@ -12,7 +12,6 @@ from .._shared.transform cimport integrate cdef extern from "numpy/npy_math.h": double NAN "NPY_NAN" - ctypedef fused uint_8_16: cnp.uint8_t cnp.uint16_t diff --git a/skimage/feature/texture.py b/skimage/feature/texture.py index c3e19810..49763433 100644 --- a/skimage/feature/texture.py +++ b/skimage/feature/texture.py @@ -106,8 +106,6 @@ def greycomatrix(image, distances, angles, levels=None, symmetric=False, image_max = image.max() - #if image.dtype in [np.float, np.float16, np.float32, np.float] - #if image.dtype == np.float: if np.issubdtype(image.dtype, np.float): raise ValueError("Float images are not supported by greycomatrix. " "The image needs to be cast to an unsigned integer type.") @@ -124,9 +122,6 @@ def greycomatrix(image, distances, angles, levels=None, symmetric=False, assert image_max < levels, "The image maximum needs to be smaller than `levels`." - # image is cast to uint16 (because of fixed typing in cython) - #image = image.astype(np.uint16) - distances = np.ascontiguousarray(distances, dtype=np.float64) angles = np.ascontiguousarray(angles, dtype=np.float64)