Mercurial > hg > nsaunier > traffic-intelligence
diff python/processing.py @ 1012:01db14e947e4
resolved
| author | Wendlasida |
|---|---|
| date | Fri, 01 Jun 2018 10:47:49 -0400 |
| parents | 933670761a57 |
| children |
line wrap: on
line diff
--- a/python/processing.py Fri Jun 01 10:43:23 2018 -0400 +++ b/python/processing.py Fri Jun 01 10:47:49 2018 -0400 @@ -13,8 +13,8 @@ for o in objects: inPolygon = nx.points_inside_poly(o.getPositions().asArray().T, zone.T) if inPolygon.any(): - objspeeds = [o.getVelocityAt(i).norm2() for i in xrange(int(o.length()-1)) if inPolygon[i]] + objspeeds = [o.getVelocityAt(i).norm2() for i in range(int(o.length()-1)) if inPolygon[i]] speeds[o.num] = np.mean(objspeeds) # km/h else: objectsNotInZone.append(o) - return speeds.values(), speeds, objectsNotInZone + return speeds, objectsNotInZone
