From 3eafde849de95f1e4f8bab208548c33cd23efd64 Mon Sep 17 00:00:00 2001 From: Micha Burkhardt Date: Tue, 16 Sep 2025 09:46:49 +0200 Subject: [PATCH] Fix shape check --- bct/algorithms/modularity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bct/algorithms/modularity.py b/bct/algorithms/modularity.py index 3ac6b4d..6e748a8 100644 --- a/bct/algorithms/modularity.py +++ b/bct/algorithms/modularity.py @@ -371,7 +371,7 @@ def link_communities(W, type_clustering='single'): dc = (mc - min_mc) / (nc * (nc - 1) / 2 - min_mc) # community density - if np.array(dc).shape is not (): + if np.array(dc).shape != (): print(dc) print(dc.shape)