From 9b02f2016f9cd41e8f8b977fa6210d5c7817f7d7 Mon Sep 17 00:00:00 2001 From: Manu Setty Date: Wed, 29 Aug 2018 08:31:42 -0400 Subject: [PATCH] Bug fix in affinities --- src/harmony/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harmony/core.py b/src/harmony/core.py index f53d3c8..61447f5 100644 --- a/src/harmony/core.py +++ b/src/harmony/core.py @@ -93,7 +93,7 @@ def _convert_to_affinity(adj, scaling_factors, with_self_loops=False): """ N = adj.shape[0] rows, cols, dists = find(adj) - dists = dists / (scaling_factors.values[rows] ** 2) + dists = dists ** 2/ (scaling_factors.values[rows] ** 2) # Self loops if with_self_loops: