Skip to content

Commit 1bd1b26

Browse files
committed
Applied suggestions
1 parent b3f3e21 commit 1bd1b26

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/utils.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@ macro check_args(K, param, cond, desc=string(cond))
99
end
1010
end
1111

12-
13-
# abstract type VecOfVecs{T, TX <: AbstractMatrix{T}, S} <: AbstractVector{S} end
14-
15-
function vec_of_vecs(X::AbstractMatrix, obsdim)
12+
function vec_of_vecs(X::AbstractMatrix; obsdim::Int = 2)
1613
@assert obsdim (1, 2) "obsdim should be 1 or 2"
1714
if obsdim == 1
1815
RowVecs(X)

test/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@testset "utils" begin
2-
using KernelFunctions: VecOfVecs, ColVecs, RowVecs
2+
using KernelFunctions: vec_of_vecs, ColVecs, RowVecs
33
rng, N, D = MersenneTwister(123456), 10, 4
44
x, X = randn(rng, N), randn(rng, D, N)
55
@testset "VecOfVecs" begin
6-
@test vec_of_vecs(X, 2) == ColVecs(X)
7-
@test vec_of_vecs(X, 1) == RowVecs(X)
6+
@test vec_of_vecs(X, obsdim = 2) == ColVecs(X)
7+
@test vec_of_vecs(X, obsdim = 1) == RowVecs(X)
88
end
99
# Test Matrix data sets.
1010
@testset "ColVecs" begin

0 commit comments

Comments
 (0)