removed commented code lines; fused types work now.

This commit is contained in:
walter
2016-06-10 13:13:48 +02:00
parent 3b8be94d74
commit 6a059867ba
2 changed files with 0 additions and 6 deletions
-1
View File
@@ -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
-5
View File
@@ -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)