Skip to content

Video editing with Python

Fix Issue #373 Trajectory.save_list (#394)

dermusikman3edc5c68c7e5
diff --git a/moviepy/video/tools/interpolators.py b/moviepy/video/tools/interpolators.py
index f2971cf0..3bfdcb78 100644
--- a/moviepy/video/tools/interpolators.py
+++ b/moviepy/video/tools/interpolators.py
@@ -60,9 +60,9 @@ class Trajectory:
@staticmethod
def save_list(trajs, filename):
N = len(trajs)
- arr = np.hstack([np.array(t.txy(tms=True)) for t in trajs])
+ arr = np.hstack([np.array(list(t.txy(tms=True))) for t in trajs])
np.savetxt( filename, arr, fmt="%d", delimiter='\t',
- header = "\t".join(N*['t (ms)', 'x', 'y']))
+ header = "\t".join(N*['t(ms)', 'x', 'y']))
@staticmethod
def load_list(filename):