Skip to content

Commit 3416c66

Browse files
author
Katelyn Begany
committed
RF: update check_integrity docstring
1 parent 3e34237 commit 3416c66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

brainx/modularity.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,12 +663,14 @@ def store_best(self):
663663
self.bestindex = copy.deepcopy(self.index)
664664

665665
def check_integrity(self, partition):
666-
""" Raises error if partition structure is invalid """
666+
""" Raises error if partition structure contains
667+
empty partitions or Nan values"""
667668

668669
# Raise error if any partition is empty
669670
if [partition[key] == set([]) for key in partition.keys()]:
670671
raise ValueError("Partition index %s is empty" % (key))
671672

673+
# Raise error if any partition contains NaN value(s)
672674
if [np.isnan(value) for sets in partition.values() for value in sets]:
673675
raise ValueError("Partition contains NaN(s)")
674676

0 commit comments

Comments
 (0)