From 89f227c5ffbb7a5c405c1a81d8dd3e6009a4e70e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Sat, 15 Jun 2013 17:10:03 +0200 Subject: [PATCH] iradon_sart: Remove needless memoryview/ndarray conversion. image_update is not manipulated in sart_projection_update and the conversion to memoryview will happen when it is passed to the subroutines anyway. --- skimage/transform/_radon_transform.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/transform/_radon_transform.pyx b/skimage/transform/_radon_transform.pyx index bd2f356c..d6112a57 100644 --- a/skimage/transform/_radon_transform.pyx +++ b/skimage/transform/_radon_transform.pyx @@ -192,11 +192,11 @@ def sart_projection_update(cnp.double_t[:, :] image not None, Array of same shape as ``image`` containing updates that should be added to ``image`` to improve the reconstruction estimate """ - cdef cnp.double_t[:, :] image_update = np.zeros_like(image) + cdef cnp.ndarray[cnp.double_t, ndim=2] image_update = np.zeros_like(image) cdef cnp.double_t ray_position cdef Py_ssize_t i for i in range(projection.shape[0]): ray_position = i + projection_shift bilinear_ray_update(image, image_update, theta, ray_position, projection[i]) - return np.asarray(image_update) + return image_update