diff --git a/skimage/feature/tests/test_brief.py b/skimage/feature/tests/test_brief.py index 0f0a9b1f..414be70c 100644 --- a/skimage/feature/tests/test_brief.py +++ b/skimage/feature/tests/test_brief.py @@ -3,8 +3,7 @@ from numpy.testing import assert_array_equal, assert_raises from skimage import data from skimage import transform as tf from skimage.color import rgb2gray -from skimage.feature import (BRIEF, match_binary_descriptors, - corner_peaks, corner_harris) +from skimage.feature import BRIEF, corner_peaks, corner_harris def test_color_image_unsupported_error(): diff --git a/skimage/feature/tests/test_util.py b/skimage/feature/tests/test_util.py index 6e25f51a..6e56d0dd 100644 --- a/skimage/feature/tests/test_util.py +++ b/skimage/feature/tests/test_util.py @@ -1,30 +1,5 @@ import numpy as np from numpy.testing import assert_array_equal -from skimage.feature.util import pairwise_hamming_distance - - -def test_pairwise_hamming_distance_range(): - """Values of all the pairwise hamming distances should be in the range - [0, 1].""" - a = np.random.random_sample((10, 50)) > 0.5 - b = np.random.random_sample((20, 50)) > 0.5 - dist = pairwise_hamming_distance(a, b) - assert np.all((0 <= dist) & (dist <= 1)) - - -def test_pairwise_hamming_distance_value(): - """The result of pairwise_hamming_distance of two fixed sets of boolean - vectors should be same as expected.""" - np.random.seed(10) - a = np.random.random_sample((4, 100)) > 0.5 - np.random.seed(20) - b = np.random.random_sample((3, 100)) > 0.5 - result = pairwise_hamming_distance(a, b) - expected = np.array([[0.5 , 0.49, 0.44], - [0.44, 0.53, 0.52], - [0.4 , 0.55, 0.5 ], - [0.47, 0.48, 0.57]]) - assert_array_equal(result, expected) if __name__ == '__main__':