From d05f38d33d81e6d32bc4498a71ce9f7e61cfd495 Mon Sep 17 00:00:00 2001 From: Tiago Freitas Pereira <tiagofrepereira@gmail.com> Date: Sun, 8 Jul 2018 09:01:40 +0200 Subject: [PATCH] Fixing comparison --- bob/bio/vein/tests/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bob/bio/vein/tests/test.py b/bob/bio/vein/tests/test.py index fb4c4e1..fd8bec3 100644 --- a/bob/bio/vein/tests/test.py +++ b/bob/bio/vein/tests/test.py @@ -140,7 +140,7 @@ def test_preprocessor(): preproc_ref = bob.core.convert(bob.io.base.load(output_img_filename), numpy.uint8, (0,255), (0.0,1.0)) - assert numpy.mean(numpy.abs(mask - mask_ref)) < 1e-2 + assert numpy.mean(numpy.abs(mask ^ mask_ref)) < 1e-2 # Very loose comparison! #preprocessor_utils.show_image(numpy.abs(preproc.astype('int16') - preproc_ref.astype('int16')).astype('uint8')) @@ -707,4 +707,4 @@ def test_hamming_distance(): model_3 = numpy.array([0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0]) probe_3 = numpy.array([[0, 1, 1, 1, 0, 1], [0, 1, 1, 1, 0, 1]]) score_half = HD.score(model_3, probe_3) - assert score_half == 0.5 \ No newline at end of file + assert score_half == 0.5 -- GitLab