From 4d46bc0912129d02a8d09b0d58ae1dfab2c8c48c Mon Sep 17 00:00:00 2001 From: cgohlke Date: Thu, 10 Oct 2013 21:51:56 -0700 Subject: [PATCH] TST: Fix ValueError: Buffer dtype mismatch, expected 'intp_t' but got 'long' --- skimage/transform/tests/test_hough_transform.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skimage/transform/tests/test_hough_transform.py b/skimage/transform/tests/test_hough_transform.py index 148f4d43..651861f3 100644 --- a/skimage/transform/tests/test_hough_transform.py +++ b/skimage/transform/tests/test_hough_transform.py @@ -122,7 +122,7 @@ def test_hough_circle(): y, x = circle_perimeter(y_0, x_0, radius) img[x, y] = 1 - out = tf.hough_circle(img, np.array([radius])) + out = tf.hough_circle(img, np.array([radius], dtype=np.intp)) x, y = np.where(out[0] == out[0].max()) assert_equal(x[0], x_0) @@ -138,7 +138,8 @@ def test_hough_circle_extended(): y, x = circle_perimeter(y_0, x_0, radius) img[x[np.where(x > 0)], y[np.where(x > 0)]] = 1 - out = tf.hough_circle(img, np.array([radius]), full_output=True) + out = tf.hough_circle(img, np.array([radius], dtype=np.intp), + full_output=True) x, y = np.where(out[0] == out[0].max()) # Offset for x_0, y_0