Revision | fd2a10f8a811605534377b659656b1720f554f4e (tree) |
---|---|
Zeit | 2009-12-03 23:42:27 |
Autor | lorenzo |
Commiter | lorenzo |
I updated the way in which I save files (p.save gets replaced by n.savetxt).
@@ -41,7 +41,7 @@ | ||
41 | 41 | |
42 | 42 | boot_count_cut[:,2]=boot_new_out |
43 | 43 | |
44 | - p.save("boot_new_out.dat", boot_count_cut, fmt="%d") | |
44 | + n.savetxt("boot_new_out.dat", boot_count_cut, fmt="%d") | |
45 | 45 | |
46 | 46 | return |
47 | 47 |
@@ -188,7 +188,7 @@ | ||
188 | 188 | |
189 | 189 | boot_count_cut=cut_raw_data(raw_data) |
190 | 190 | |
191 | -p.save("new_boot_count_cut.dat", boot_count_cut, fmt="%d") | |
191 | +n.savetxt("new_boot_count_cut.dat", boot_count_cut, fmt="%d") | |
192 | 192 | |
193 | 193 | |
194 | 194 |
@@ -41,7 +41,7 @@ | ||
41 | 41 | #at which contacts are estabilished. It is important to get rid |
42 | 42 | #of repeated times, otherwise the final array would be |
43 | 43 | #both redundant and huge |
44 | - p.save("time_unique.dat",time_unique, fmt='%d') | |
44 | + n.savetxt("time_unique.dat",time_unique, fmt='%d') | |
45 | 45 | time_boot=bootcount_data[:,0] |
46 | 46 | |
47 | 47 | # s.where(s.setmember1d(A,B)) |
@@ -55,7 +55,7 @@ | ||
55 | 55 | #is obviously not the case. |
56 | 56 | my_sel=ismember(time_boot, time_unique) |
57 | 57 | time_boot_sel=time_boot[my_sel] |
58 | - p.save("time_boot_sel.dat",time_boot_sel, fmt='%d') | |
58 | + n.savetxt("time_boot_sel.dat",time_boot_sel, fmt='%d') | |
59 | 59 | |
60 | 60 | boot_cut=bootcount_data[my_sel,:] |
61 | 61 | boot_out=boot_cut[:,0:3] |
@@ -181,7 +181,7 @@ | ||
181 | 181 | time_edge_list_and_boot_binary[:,3]=time_edge_list_and_boot[sel_odd,1] |
182 | 182 | time_edge_list_and_boot_binary[:,4]=time_edge_list_and_boot[sel_odd,2] |
183 | 183 | |
184 | - p.save("edge_list_and_boot_binary.dat",\ | |
184 | + n.savetxt("edge_list_and_boot_binary.dat",\ | |
185 | 185 | time_edge_list_and_boot_binary, fmt='%d') |
186 | 186 | |
187 | 187 | #Now I can create a new list where each couple (tag_id,bootcount) is |
@@ -197,7 +197,7 @@ | ||
197 | 197 | time_edge_list_and_boot_hashed[:,2]=\ |
198 | 198 | couple_hash_table2(time_edge_list_and_boot_binary[:,3:5]) |
199 | 199 | print "hashing done again" |
200 | - p.save("edge_list_and_boot_hashed.dat",\ | |
200 | + n.savetxt("edge_list_and_boot_hashed.dat",\ | |
201 | 201 | time_edge_list_and_boot_hashed, fmt='%d') |
202 | 202 | |
203 | 203 |
@@ -329,7 +329,7 @@ | ||
329 | 329 | time_edge_list_and_boot_binary[:,3]=time_edge_list_and_boot[sel_odd,1] |
330 | 330 | time_edge_list_and_boot_binary[:,4]=time_edge_list_and_boot[sel_odd,2] |
331 | 331 | |
332 | - p.save("edge_list_and_boot_binary.dat",\ | |
332 | + n.savetxt("edge_list_and_boot_binary.dat",\ | |
333 | 333 | time_edge_list_and_boot_binary, fmt='%d') |
334 | 334 | |
335 | 335 | #Now I can create a new list where each couple (tag_id,bootcount) is |
@@ -345,7 +345,7 @@ | ||
345 | 345 | time_edge_list_and_boot_hashed[:,2]=\ |
346 | 346 | couple_hash_table2(time_edge_list_and_boot_binary[:,3:5]) |
347 | 347 | print "hashing done again" |
348 | - p.save("edge_list_and_boot_hashed.dat",\ | |
348 | + n.savetxt("edge_list_and_boot_hashed.dat",\ | |
349 | 349 | time_edge_list_and_boot_hashed, fmt='%d') |
350 | 350 | |
351 | 351 |
@@ -390,7 +390,7 @@ | ||
390 | 390 | # time_edge_list=time_edge_list.astype("uint64") |
391 | 391 | time_edge_list_reshaped=duplicate_and_mix_array(time_edge_list) |
392 | 392 | time_edge_list_reshaped=time_edge_list_reshaped.astype("int64") |
393 | -p.save("edge_list_reshaped.dat",time_edge_list_reshaped, fmt='%d') | |
393 | +n.savetxt("edge_list_reshaped.dat",time_edge_list_reshaped, fmt='%d') | |
394 | 394 | |
395 | 395 | # resized_tag_boot_list=p.load("boot_count_cut.dat") |
396 | 396 | # resized_tag_boot_list=resized_tag_boot_list.astype("int") |