Skip to content

Commit

Permalink
affprop: fix test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
alyst committed Jul 26, 2023
1 parent 95c9714 commit 48dded1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/affprop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ include("test_helpers.jl")
@test_throws ArgumentError affinityprop(randn(2, 2), tol=0.0)
@test_throws ArgumentError affinityprop(randn(2, 2), damp=-0.1)
@test_throws ArgumentError affinityprop(randn(2, 2), damp=1.0)
@test affinityprop(randn(2, 2), damp=0.5, tol=0.5) isa AffinityPropResult
x = randn(2, 4)
S = -pairwise(Euclidean(), x, x, dims=2)
@test affinityprop(S, damp=0.5, tol=0.5) isa AffinityPropResult
for disp in keys(Clustering.DisplayLevels)
@test affinityprop(randn(2, 2), tol=0.1, display=disp) isa AffinityPropResult
@test affinityprop(S, tol=0.1, display=disp) isa AffinityPropResult
end
end

Expand Down

0 comments on commit 48dded1

Please sign in to comment.