File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,6 @@ def _community_leiden(
461
461
)
462
462
463
463
464
-
465
464
def _community_fluid_communities (graph , no_of_communities ):
466
465
"""Community detection based on fluids interacting on the graph.
467
466
@@ -475,15 +474,15 @@ def _community_fluid_communities(graph, no_of_communities):
475
474
Scalable and Diverse Community Detection Algorithm.
476
475
477
476
@param no_of_communities: The number of communities to be found. Must be
478
- greater than 0 and fewer than number of vertices in the graph.
477
+ greater than 0 and fewer than or equal to the number of vertices in the graph.
479
478
@return: an appropriate L{VertexClustering} object.
480
479
"""
481
480
# Validate input parameters
482
481
if no_of_communities <= 0 :
483
482
raise ValueError ("no_of_communities must be greater than 0" )
484
483
485
- if no_of_communities >= graph .vcount ():
486
- raise ValueError ("no_of_communities must be fewer than the number of vertices" )
484
+ if no_of_communities > graph .vcount ():
485
+ raise ValueError ("no_of_communities must be fewer than or equal to the number of vertices" )
487
486
488
487
# Check if graph is weighted (not supported)
489
488
if graph .is_weighted ():
You can’t perform that action at this time.
0 commit comments