Mercurial Hosting > traffic-intelligence
diff scripts/compute-clearmot.py @ 998:933670761a57
updated code to python 3 (tests pass and scripts run, but non-executed parts of code are probably still not correct)
author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
---|---|
date | Sun, 27 May 2018 23:22:48 -0400 |
parents | 51d8406b2489 |
children | cc5cb04b04b0 |
line wrap: on
line diff
--- a/scripts/compute-clearmot.py Fri May 25 18:15:18 2018 -0400 +++ b/scripts/compute-clearmot.py Sun May 27 23:22:48 2018 -0400 @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import sys, argparse from numpy import loadtxt @@ -71,7 +71,7 @@ def shiftMatches(matches, offset): shifted = {} for k in matches: - shifted[k] = {t+offset:v for t, v in matches[k].iteritems()} + shifted[k] = {t+offset:v for t, v in matches[k].items()} return shifted if args.display: