Skip to content

Commit 614c703

Browse files
committed
Clean up index notation
1 parent 1607b21 commit 614c703

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/approximations/nystrom.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ end
1111

1212
function nystrom_sample(k::Kernel, X::AbstractMatrix, S::Vector{<:Integer}; obsdim::Integer=defaultobs)
1313
obsdim [1, 2] || throw(ArgumentError("`obsdim` should be 1 or 2 (see docs of kernelmatrix))"))
14-
Xₘ = obsdim == 1 ? getindex(X, S, :) : getindex(X, :, S)
14+
Xₘ = obsdim == 1 ? X[S, :] : X[:, S]
1515
C = k(Xₘ, X; obsdim=obsdim)
1616
Cs = getindex(C, :, S)
1717
return (C, Cs)

0 commit comments

Comments
 (0)