From a342130dd215c4797aa865948e2b20edcd628a79 Mon Sep 17 00:00:00 2001 From: Michael Grupp Date: Tue, 28 Jan 2025 11:33:27 +0100 Subject: [PATCH] Fix mypy error caused by new numpy typing --- evo/tools/plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evo/tools/plot.py b/evo/tools/plot.py index 0dec9a2..7a78538 100644 --- a/evo/tools/plot.py +++ b/evo/tools/plot.py @@ -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})", @@ -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):