Skip to content

Commit

Permalink
Enable quantile test on Julia 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreener64 committed Aug 7, 2023
1 parent 84f5331 commit 9c52e3d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2470,10 +2470,7 @@ end
@test autodiff(Reverse, f8, Active, Active(1.5))[1][1] == 0
@test autodiff(Forward, f8, Duplicated(1.5, 1.0))[1] == 0

# On Julia 1.6 the gradients are wrong (0.7 not 1.2), see #973
@static if VERSION v"1.7-"
f9(x) = sum(quantile([1.0, x], [0.5, 0.7]))
@test autodiff(Reverse, f9, Active, Active(2.0))[1][1] == 1.2
@test autodiff(Forward, f9, Duplicated(2.0, 1.0))[1] == 1.2
end
f9(x) = sum(quantile([1.0, x], [0.5, 0.7]))
@test autodiff(Reverse, f9, Active, Active(2.0))[1][1] == 1.2
@test autodiff(Forward, f9, Duplicated(2.0, 1.0))[1] == 1.2
end

0 comments on commit 9c52e3d

Please sign in to comment.