From 5873159f1dcd0e754a984886e0ce6881a8a8b789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Sch=C3=B6nberger?= Date: Mon, 21 Oct 2013 14:01:47 +0200 Subject: [PATCH] Explicitly cast image shape to integer value --- skimage/transform/_warps_cy.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/transform/_warps_cy.pyx b/skimage/transform/_warps_cy.pyx index b3136c22..433c586d 100644 --- a/skimage/transform/_warps_cy.pyx +++ b/skimage/transform/_warps_cy.pyx @@ -89,11 +89,11 @@ def _warp_fast(cnp.ndarray image, cnp.ndarray H, output_shape=None, cdef Py_ssize_t out_r, out_c if output_shape is None: - out_r = img.shape[0] - out_c = img.shape[1] + out_r = int(img.shape[0]) + out_c = int(img.shape[1]) else: - out_r = output_shape[0] - out_c = output_shape[1] + out_r = int(output_shape[0]) + out_c = int(output_shape[1]) cdef double[:, ::1] out = np.zeros((out_r, out_c), dtype=np.double)