diff scripts/learn-poi.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 c030f735c594
children cc5cb04b04b0
line wrap: on
line diff
--- a/scripts/learn-poi.py	Fri May 25 18:15:18 2018 -0400
+++ b/scripts/learn-poi.py	Sun May 27 23:22:48 2018 -0400
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 
 import argparse
 
@@ -78,8 +78,8 @@
 if args.assign:
     storage.savePOIAssignments(args.databaseFilename, objects)
     if args.displayPaths:
-        for i in xrange(args.nOriginClusters):
-            for j in xrange(args.nDestinationClusters):
+        for i in range(args.nOriginClusters):
+            for j in range(args.nDestinationClusters):
                 odObjects = [o for o in objects if o.od[0] == i and o.od[1] == j]
                 if len(odObjects) > 0:
                     fig = plt.figure()