Skip to content

Commit 6266056

Browse files
CompatHelper: bump compat for "FiniteDifferences" to "0.11" for package test (#188)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: David Widmann <[email protected]>
1 parent 2be60e2 commit 6266056

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

test/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
1616
[compat]
1717
AxisArrays = "0.4.3"
1818
Distances = "0.9"
19-
FiniteDifferences = "0.10.8"
19+
FiniteDifferences = "0.10.8, 0.11"
2020
Flux = "0.10, 0.11"
2121
ForwardDiff = "0.10"
2222
Kronecker = "0.4"

test/basekernels/maha.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
@test repr(k) == "Mahalanobis Kernel (size(P) = $(size(P)))"
1919

2020
M1, M2 = rand(rng,3,2), rand(rng,3,2)
21-
fdm = FiniteDifferences.Central(5, 1);
22-
2321

2422
function FiniteDifferences.to_vec(dist::SqMahalanobis{Float64})
2523
return vec(dist.qmat), x -> SqMahalanobis(reshape(x, size(dist.qmat)...))
@@ -30,14 +28,14 @@
3028
return MahalanobisKernel(P=Array(U'*U))(v1, v2)
3129
end
3230

33-
@test all(FiniteDifferences.j′vp(fdm, test_mahakernel, a, U, v1, v2)[1] .≈
31+
@test all(FiniteDifferences.j′vp(FDM, test_mahakernel, a, U, v1, v2)[1] .≈
3432
UpperTriangular(Zygote.pullback(test_mahakernel, U, v1, v2)[2](a)[1]))
3533

3634
function test_sqmaha(U::UpperTriangular, v1::AbstractVector, v2::AbstractVector)
3735
return SqMahalanobis(Array(U'*U))(v1, v2)
3836
end
3937

40-
@test all(FiniteDifferences.j′vp(fdm, test_sqmaha, a, U, v1, v2)[1] .≈
38+
@test all(FiniteDifferences.j′vp(FDM, test_sqmaha, a, U, v1, v2)[1] .≈
4139
UpperTriangular(Zygote.pullback(test_sqmaha, U, v1, v2)[2](a)[1]))
4240

4341
# test_ADs(U -> MahalanobisKernel(P=Array(U' * U)), U, ADs=[:Zygote])

0 commit comments

Comments
 (0)