Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow a bit of absolute tolerance deviation in a test, #228

Merged
merged 1 commit into from
May 28, 2024

Conversation

KristofferC
Copy link
Member

otherwise, we require absolute equality when one of the values are 0.0

Due to the following difference in 1.11, this test otherwise fails:

julia> K = reshape(1.:12., 3, 4)
3×4 reshape(::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}, 3, 4) with eltype Float64:
 1.0  4.0  7.0  10.0
 2.0  5.0  8.0  11.0
 3.0  6.0  9.0  12.0

julia> x, y = size(K)
(3, 4)

julia> I1 = ones(x,x)/x
3×3 Matrix{Float64}:
 0.333333  0.333333  0.333333
 0.333333  0.333333  0.333333
 0.333333  0.333333  0.333333

# 1.11
julia> (- I1*K)[1,4]
-10.999999999999998

# 1.10
julia> (- I1*K)[1,4]
-11.0

otherwise, we require absolute equality when one of the values are 0.0
@timholy timholy merged commit e64e4f4 into JuliaStats:master May 28, 2024
6 checks passed
@timholy
Copy link
Collaborator

timholy commented May 28, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants