We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6f3590 commit 3e34237Copy full SHA for 3e34237
brainx/modularity.py
@@ -668,6 +668,9 @@ def check_integrity(self, partition):
668
# Raise error if any partition is empty
669
if [partition[key] == set([]) for key in partition.keys()]:
670
raise ValueError("Partition index %s is empty" % (key))
671
+
672
+ if [np.isnan(value) for sets in partition.values() for value in sets]:
673
+ raise ValueError("Partition contains NaN(s)")
674
675
#-----------------------------------------------------------------------------
676
# Functions
0 commit comments