velocities = list() for dance in data: vel = (np.roll(dance[1], -1) - np.roll(dance[1], 1)) / (np.roll(dance[0], -1) - np.roll(dance[0], 1)) velocities.append(np.vstack([dance[0], vel]))