Skip to content

Commit

Permalink
Fix mypy error caused by new numpy typing
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGrupp committed Jan 28, 2025
1 parent 9fd2439 commit a342130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions evo/tools/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def traj_xyz(axarr: np.ndarray, traj: trajectory.PosePath3D, style: str = '-',
x = traj.timestamps
xlabel = "$t$ (s)"
else:
x = np.arange(0., len(traj.positions_xyz))
x = np.arange(0., len(traj.positions_xyz), dtype=float)
xlabel = "index"
ylabels = [
f"$x$ ({length_unit.value})", f"$y$ ({length_unit.value})",
Expand Down Expand Up @@ -640,7 +640,7 @@ def traj_rpy(axarr: np.ndarray, traj: trajectory.PosePath3D, style: str = '-',
x = traj.timestamps
xlabel = "$t$ (s)"
else:
x = np.arange(0., len(angles))
x = np.arange(0., len(angles), dtype=float)
xlabel = "index"
ylabels = ["$roll$ (deg)", "$pitch$ (deg)", "$yaw$ (deg)"]
for i in range(0, 3):
Expand Down

0 comments on commit a342130

Please sign in to comment.