Skip to content

Commit bcd45ee

Browse files
committed
Corrected bug in symmetric K
1 parent e659c5e commit bcd45ee

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/kernelmatrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function kernelmatrix!(
4747
symmetrize::Bool = true
4848
) where {T,T₁<:Real,T₂<:Real}
4949
#TODO Check dimension consistency
50-
_symmetric_kappamatrix!(κ,pairwise!(metric(κ),X,dims=obsdim),symmetrize)
50+
_symmetric_kappamatrix!(κ,pairwise!(K,metric(κ),X,dims=obsdim),symmetrize)
5151
end
5252

5353
# Convenience Methods ======================================================================

src/kernels/squaredexponential.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ related form of the kernel or [`GammaExponentialKernel`](@ref) for a generalizat
1212
1313
# Examples
1414
15-
```jldoctest; setup = :(using MLKernels)
15+
```jldoctest; setup = :(using KernelFunctions)
1616
julia> SquaredExponentialKernel()
17-
SquaredExponentialKernel{Float64}(1.0)
17+
SquaredExponentialKernel{Float64,Float64}(1.0)
1818
1919
julia> SquaredExponentialKernel(2.0f0)
20-
SquaredExponentialKernel{Float32}(2.0)
20+
SquaredExponentialKernel{Float32,Float32}(2.0)
21+
22+
julia> SquaredExponentialKernel([2.0,3.0])
23+
SquaredExponentialKernel{Float64,Array{Float64}}(1.0)
2124
```
2225
"""
2326
struct SquaredExponentialKernel{T<:Real,A} <: Kernel{T}

0 commit comments

Comments
 (0)