-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Petar Veličković
committed
Jan 21, 2018
1 parent
de7bd67
commit a2a3497
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import numpy as np | ||
import sys | ||
|
||
mst = {} | ||
|
||
indices = np.empty(365) | ||
|
||
with open(sys.argv[2], 'r') as f: | ||
for line in f: | ||
els = line.split() | ||
mst[els[0]] = els[1] | ||
|
||
with open(sys.argv[1], 'r') as f: | ||
for line in f: | ||
els = line.split() | ||
if els[0] in mst: | ||
indices[int(mst[els[0]])] = els[1] | ||
print(mst[els[0]], '->', els[1]) | ||
|
||
np.save('mask.npy', indices) | ||
|