Skip to content

Commit ed36f46

Browse files
committed
Set SpecialFunctions compat and fix deprecations
1 parent 33baeeb commit ed36f46

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
1515
Compat = "2.2"
1616
Distances = "0.8"
1717
PDMats = "0.9"
18-
SpecialFunctions = "0"
18+
SpecialFunctions = "0.9"
1919
StatsFuns = "0.8"
2020
ZygoteRules = "0.2"
2121
julia = "1.0"

src/KernelFunctions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export Transform, SelectTransform, ChainTransform, ScaleTransform, LowRankTransf
1616

1717
using Compat
1818
using Distances, LinearAlgebra
19-
using SpecialFunctions: lgamma, besselk
19+
using SpecialFunctions: logabsgamma, besselk
2020
using ZygoteRules: @adjoint
2121
using StatsFuns: logtwo
2222
using PDMats: PDMat

src/kernels/matern.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ end
3333
params(k::MaternKernel) = (params(transform(k)),k.ν)
3434
opt_params(k::MaternKernel) = (opt_params(transform(k)),k.ν)
3535

36-
@inline kappa::MaternKernel, d::Real) = iszero(d) ? one(d) : exp((1.0-κ.ν)*logtwo-lgamma.ν) + κ.ν*log(sqrt(2κ.ν)*d)+log(besselk.ν,sqrt(2κ.ν)*d)))
36+
@inline kappa::MaternKernel, d::Real) = iszero(d) ? one(d) : exp((1.0-κ.ν)*logtwo-logabsgamma.ν)[1] + κ.ν*log(sqrt(2κ.ν)*d)+log(besselk.ν,sqrt(2κ.ν)*d)))
3737

3838
"""
3939
`Matern32Kernel([ρ=1.0])`

0 commit comments

Comments
 (0)