Changing datatype of traj.