From b2006da3461106ba41834acb6d3c81e45f4ea08e Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Mon, 26 Mar 2012 20:17:55 -0400 Subject: [PATCH] Change `flipud`/`fliplr` to array indexing. --- skimage/feature/_template.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/feature/_template.pyx b/skimage/feature/_template.pyx index 7f31d31e..4fa776d4 100644 --- a/skimage/feature/_template.pyx +++ b/skimage/feature/_template.pyx @@ -102,7 +102,7 @@ def match_template(np.ndarray[float, ndim=2, mode="c"] image, # when `dtype=float` is used, ascontiguousarray returns ``double``. corr = np.ascontiguousarray(fftconvolve(image, - np.flipud(np.fliplr(template)), + template[::-1, ::-1], mode="valid"), dtype=np.float32)