From b7ac24916f5be1cbcf5ec432014cea1fd60a2fb4 Mon Sep 17 00:00:00 2001 From: Tim Holy Date: Wed, 5 Aug 2015 11:00:53 -0500 Subject: [PATCH] [Images] Compensate for isapprox(eps(), 0.0) = false on julia 0.4 https://github.com/JuliaLang/julia/pull/12393 --- packages/Images/test/algorithms.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/Images/test/algorithms.jl b/packages/Images/test/algorithms.jl index 289c0dc78..b5bf9d6f3 100644 --- a/packages/Images/test/algorithms.jl +++ b/packages/Images/test/algorithms.jl @@ -182,7 +182,9 @@ facts("Algorithms") do Afft = Images.imfilter_fft(A, kern, "inner") @fact Af => roughly(Afft) h = [0.24,0.87] - @fact Images.imfilter(eye(3), h, "inner") => roughly(Images.imfilter_fft(eye(3), h, "inner")) # issue #204 + hfft = Images.imfilter_fft(eye(3), h, "inner") + hfft[abs(hfft) .< 3eps()] = 0 + @fact Images.imfilter(eye(3), h, "inner") => roughly(hfft) # issue #204 @fact approx_equal(Images.imfilter_gaussian(ones(4,4), [5,5]), 1.0) => true A = fill(convert(Float32, NaN), 3, 3)