Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simsurace committed Feb 21, 2024
1 parent bad9ebb commit 222ef63
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ using Test
v1 = zeros(50)
v2 = zeros(50)
@testset "Consistency with KernelFunctions.jl" begin
@testset "$k2" for (k1, k2) in (
@testset "$kernel2" for (kernel1, kernel2) in (
SEKernel() => ScalarSEKernel(),
LinearKernel() => ScalarLinearKernel(),
PeriodicKernel() => ScalarPeriodicKernel(),
PeriodicKernel(; r = [2.]) => ScalarPeriodicKernel(2.),
2. * SEKernel() + 3. * LinearKernel() => 2. * ScalarSEKernel() + 3. * ScalarLinearKernel(),
SEKernel() * PeriodicKernel() => ScalarSEKernel() * ScalarPeriodicKernel()
)
@testset for (kernel1, kernel2) in (
(k1, k2),
with_lengthscale.((k1, k2), 2.),
2 .* (k1, k2)
@testset for (k1, k2) in (
(kernel1, kernel2),
with_lengthscale.((kernel1, kernel2), 2.),
2 .* (kernel1, kernel2)
)
@test k1(1., 4.) k2(1., 4.)
@test kernelmatrix(k1, x) kernelmatrix(k2, x)
Expand Down

0 comments on commit 222ef63

Please sign in to comment.