Created
October 24, 2019 15:22
-
-
Save dietercastel/4ff276ad7d70ba91321a070de72b00f3 to your computer and use it in GitHub Desktop.
Elementwise vs overall Approx Bug Julia?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Test | |
alldigits = cat([[0.375297 0.624703]; [0.39924 0.60076]], [[0.664557 0.335443]; [0.664557 0.335443]], dims=3) | |
threedig = map(x -> round(x,digits=3), alldigits) | |
@testset "Testing" begin | |
@test size(alldigits) == size(threedig) | |
@test all(isapprox.(alldigits, threedig, atol=1e-3)) | |
#This one fails??? | |
@test isapprox(alldigits, threedig, atol=1e-3) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment