Skip to content
Snippets Groups Projects
Commit f63a254e authored by tomrink's avatar tomrink
Browse files

time sort pirep dictionarys just in case.

parent 60d68f30
No related branches found
No related tags found
No related merge requests found
...@@ -33,13 +33,16 @@ def time_sort_pirep_dict(the_dict): ...@@ -33,13 +33,16 @@ def time_sort_pirep_dict(the_dict):
keys.append(ts) keys.append(ts)
tidx.append(idx) tidx.append(idx)
keys = np.array(keys)
tidx = np.array(tidx)
sidxs = np.argsort(keys) sidxs = np.argsort(keys)
ice_keys = keys[sidxs] keys = keys[sidxs]
ice_tidx = tidx[sidxs] tidx = tidx[sidxs]
for idx, key in enumerate(ice_keys): for idx, key in enumerate(keys):
rpts = the_dict[key] rpts = the_dict[key]
tup = rpts[ice_tidx[idx]] tup = rpts[tidx[idx]]
n_rpts = new_dict.get(key) n_rpts = new_dict.get(key)
if n_rpts is None: if n_rpts is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment