diff trafficintelligence/tests/prediction.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 a095d4fbb2ea
children
line wrap: on
line diff
--- a/trafficintelligence/tests/prediction.txt	Wed Jul 17 12:28:01 2024 -0400
+++ b/trafficintelligence/tests/prediction.txt	Sat Jul 20 20:35:21 2024 -0400
@@ -26,7 +26,7 @@
 >>> et = PredictedTrajectoryRandomControl(moving.Point(0,0),moving.Point(1,1), acceleration, steering, maxSpeed = 2)
 >>> p = et.predictPosition(500)
 >>> max(et.getPredictedSpeeds()) <= 2.
-True
+np.True_
 
 >>> p = moving.Point(3,4)
 >>> sp = SafetyPoint(p, 0.1, 0)
@@ -53,16 +53,16 @@
 >>> proto.getPositions().computeCumulativeDistances()
 >>> et = PredictedTrajectoryPrototype(proto.getPositionAt(10)+moving.Point(0.5, 0.5), proto.getVelocityAt(10)*0.9, proto, True)
 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.9) < 1e-5
-True
+np.True_
 >>> for t in range(int(proto.length())): x=et.predictPosition(t)
 >>> traj = et.getPredictedTrajectory()
 >>> traj.computeCumulativeDistances()
 >>> absolute(array(traj.distances).mean() - et.initialSpeed < 1e-3)
-True
+np.True_
 
 >>> et = PredictedTrajectoryPrototype(proto.getPositionAt(10)+moving.Point(0.6, 0.6), proto.getVelocityAt(10)*0.7, proto, False)
 >>> absolute(et.initialSpeed - proto.getVelocityAt(10).norm2()*0.7) < 1e-5
-True
+np.True_
 >>> proto = moving.MovingObject.generate(1, moving.Point(-5.,0.), moving.Point(1.,0.), moving.TimeInterval(0,10))
 >>> et = PredictedTrajectoryPrototype(proto.getPositionAt(0)+moving.Point(0., 1.), proto.getVelocityAt(0)*0.5, proto, False)
 >>> for t in range(int(proto.length()/0.5)): x=et.predictPosition(t)