From f8e0478542419c9266249367c34aa44d70976666 Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Sun, 11 Dec 2011 20:05:02 -0500 Subject: [PATCH] Remove dependency on math module --- doc/examples/plot_template.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/examples/plot_template.py b/doc/examples/plot_template.py index 6a98ae0e..28bfbcfe 100644 --- a/doc/examples/plot_template.py +++ b/doc/examples/plot_template.py @@ -16,7 +16,6 @@ import numpy as np from skimage.detection import match_template from numpy.random import randn import matplotlib.pyplot as plt -import math # We first construct a simple image target: size = 100 @@ -59,7 +58,7 @@ for i in range(50): if not found_positions: found_positions.append((x, y)) for position in found_positions: - distance = math.sqrt((x - position[0]) ** 2 + (y - position[1]) ** 2) + distance = np.sqrt((x - position[0]) ** 2 + (y - position[1]) ** 2) if distance > delta: found_positions.append((x, y)) result[y, x] = 0