diff python/tests/moving.txt @ 582:7e1ae4d97f1a

corrected bug for curvilinear trajectory with only one position and differentiation
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Thu, 18 Sep 2014 15:36:57 -0400
parents d0abd2ee17b9
children 6ebfb43e938e
line wrap: on
line diff
--- a/python/tests/moving.txt	Wed Sep 17 17:29:19 2014 -0400
+++ b/python/tests/moving.txt	Thu Sep 18 15:36:57 2014 -0400
@@ -144,6 +144,9 @@
 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1']
 >>> t.differentiate(True) # doctest:+ELLIPSIS
 [1.0, 0.0, '1'] [1.0, 0.099..., '1'] [2.0, 0.099..., '1'] [2.0, 0.099..., '1']
+>>> t = CurvilinearTrajectory(S = [1.], Y = [0.5], lanes = ['1'])
+>>> t.differentiate().empty()
+True
 
 >>> o1 = MovingObject(positions = Trajectory([[0]*3,[2]*3]), velocities = Trajectory([[0]*3,[1]*3]))
 >>> o1.classifyUserTypeSpeedMotorized(0.5, np.median)