23
23
24
24
25
25
def _read_pickle (fname ):
26
- with open (fname , 'rb' ) as f :
26
+ with open (fname , "rb" ) as f :
27
27
return pickle .load (f )
28
28
29
29
@@ -203,7 +203,7 @@ def average_networks(in_files, ntwk_res_file, group_id):
203
203
204
204
# Writes the networks and returns the name
205
205
network_name = group_id + "_average.pck"
206
- with open (op .abspath (network_name ), 'wb' ) as f :
206
+ with open (op .abspath (network_name ), "wb" ) as f :
207
207
pickle .dump (avg_ntwk , f , pickle .HIGHEST_PROTOCOL )
208
208
iflogger .info ("Saving average network as %s" , op .abspath (network_name ))
209
209
avg_ntwk = fix_keys_for_gexf (avg_ntwk )
@@ -487,7 +487,7 @@ def _run_interface(self, runtime):
487
487
for key in list (node_measures .keys ()):
488
488
newntwk = add_node_data (node_measures [key ], ntwk )
489
489
out_file = op .abspath (self ._gen_outfilename (key , "pck" ))
490
- with open (out_file , 'wb' ) as f :
490
+ with open (out_file , "wb" ) as f :
491
491
pickle .dump (newntwk , f , pickle .HIGHEST_PROTOCOL )
492
492
nodentwks .append (out_file )
493
493
if isdefined (self .inputs .out_node_metrics_matlab ):
@@ -502,7 +502,7 @@ def _run_interface(self, runtime):
502
502
for key in list (edge_measures .keys ()):
503
503
newntwk = add_edge_data (edge_measures [key ], ntwk )
504
504
out_file = op .abspath (self ._gen_outfilename (key , "pck" ))
505
- with open (out_file , 'wb' ) as f :
505
+ with open (out_file , "wb" ) as f :
506
506
pickle .dump (newntwk , f , pickle .HIGHEST_PROTOCOL )
507
507
edgentwks .append (out_file )
508
508
if isdefined (self .inputs .out_edge_metrics_matlab ):
@@ -527,7 +527,7 @@ def _run_interface(self, runtime):
527
527
out_file = op .abspath (
528
528
self ._gen_outfilename (self .inputs .out_k_crust , "pck" )
529
529
)
530
- with open (out_file , 'wb' ) as f :
530
+ with open (out_file , "wb" ) as f :
531
531
pickle .dump (ntwk_measures [key ], f , pickle .HIGHEST_PROTOCOL )
532
532
kntwks .append (out_file )
533
533
gpickled .extend (kntwks )
0 commit comments