From 48dded19b56277fc9f2e6f91d972d3213f737355 Mon Sep 17 00:00:00 2001 From: Alexey Stukalov Date: Wed, 26 Jul 2023 01:24:34 -0700 Subject: [PATCH] affprop: fix test matrix --- test/affprop.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/affprop.jl b/test/affprop.jl index 7e94027f..d51c3382 100644 --- a/test/affprop.jl +++ b/test/affprop.jl @@ -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