Fixing comparison

parent 232f4a21
Pipeline #21707 passed with stage
in 17 minutes and 25 seconds
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment