Skip to content

Commit

Permalink
Fix Issue #373 Trajectory.save_list (#394)
Browse files Browse the repository at this point in the history
* Fix Trajectory().save_list() format issue

* Use consistent header in Trajectory.savetxt()
  • Loading branch information
dermusikman authored and bearney74 committed Apr 4, 2017
1 parent 2a71175 commit 3edc5c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moviepy/video/tools/interpolators.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def from_file(filename):
@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):
Expand Down

0 comments on commit 3edc5c6

Please sign in to comment.