Mercurial > hg > nsaunier > traffic-intelligence
diff trafficintelligence/tests/indicators.txt @ 1287:76f5693b530c
updated tests for numpy 2
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Sat, 20 Jul 2024 20:35:21 -0400 |
| parents | 56d0195d043e |
| children |
line wrap: on
line diff
--- a/trafficintelligence/tests/indicators.txt Wed Jul 17 12:28:01 2024 -0400 +++ b/trafficintelligence/tests/indicators.txt Sat Jul 20 20:35:21 2024 -0400 @@ -21,29 +21,29 @@ >>> ttc = SeverityIndicator('TTC', {t:t-1 for t in TimeInterval(1,11)}, mostSevereIsMax = False) >>> ttc.getMostSevereValue(1) -0.0 +np.float64(0.0) >>> ttc.getMostSevereValue(2) -0.5 +np.float64(0.5) >>> ttc.getMostSevereValue(centile = 10.) -1.0 +np.float64(1.0) >>> ttc.mostSevereIsMax = True >>> ttc.getMostSevereValue(1) -10.0 +np.float64(10.0) >>> ttc.getMostSevereValue(2) -9.5 +np.float64(9.5) >>> ttc.getMostSevereValue(centile = 10.) -9.0 +np.float64(9.0) >>> t1 = Trajectory([[0.5,1.5,2.5],[0.5,3.5,6.5]]) >>> m = indicatorMap([1,2,3], t1, 1) >>> m[(1.0, 3.0)] -2.0 +np.float64(2.0) >>> m[(2.0, 6.0)] -3.0 +np.float64(3.0) >>> m[(0.0, 0.0)] -1.0 +np.float64(1.0) >>> m = indicatorMap([1,2,3], t1, 4) >>> m[(0.0, 1.0)] -3.0 +np.float64(3.0) >>> m[(0.0, 0.0)] -1.5 +np.float64(1.5)
