@@ -1222,13 +1222,12 @@ def simulated_annealing(g, p0=None, temperature = 50, temp_scaling = 0.995, tmin
1222
1222
npt .assert_almost_equal (debug_partition .modularity (),
1223
1223
graph_part_final .modularity (), 11 )
1224
1224
1225
- for mod in graph_part_final .index :
1226
- if len (graph_part_final .index [mod ]) < 1 :
1227
- empty_module ('LAST CHECK: Empty module after module %s,SA' % (movetype ))
1225
+ debug_partition .check_integrity (graph_part_final .index )
1228
1226
1229
1227
if extra_info :
1230
1228
extra_dict = dict (energy = energy_array , temp = temp_array )
1231
- #return graph_partition, extra_dict
1229
+ graph_part_final .check_integrity (graph_part_final .index )
1230
+ #return graph_partition, extra_dict
1232
1231
return graph_part_final , extra_dict
1233
1232
else :
1234
1233
#return graph_partition
@@ -1245,9 +1244,8 @@ def simulated_annealing(g, p0=None, temperature = 50, temp_scaling = 0.995, tmin
1245
1244
if np .abs (finalmodval - (- energy_best )) > 0.000001 : #to account for float error
1246
1245
raise ValueError ('mismatch in energy and modularity' )
1247
1246
1248
- check_integrity (graph_part_final )
1249
1247
1250
- return graph_part_final ,graph_part_final .modularity ()
1248
+ return graph_part_final , graph_part_final .modularity ()
1251
1249
1252
1250
1253
1251
def modularity_matrix (g ):
0 commit comments