Skip to content

Commit

Permalink
Fix mypy for numpy 2.2.0 (#711)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGrupp authored Dec 9, 2024
1 parent 47755ec commit 4838b51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions evo/core/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def filter_pairs_by_index(poses: typing.Sequence[np.ndarray], delta: int,
:return: list of index tuples of the filtered pairs
"""
if all_pairs:
ids = np.arange(len(poses))
ids = np.arange(len(poses), dtype=int)
id_pairs = [(i, i + delta) for i in ids if i + delta < len(poses)]
else:
ids = np.arange(0, len(poses), delta)
ids = np.arange(0, len(poses), delta, dtype=int)
id_pairs = [(i, j) for i, j in zip(ids, ids[1:])]
return id_pairs

Expand Down
2 changes: 1 addition & 1 deletion evo/core/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def transform(self, t: np.ndarray, right_mul: bool = False,
self._poses_se3 = [np.dot(p, t) for p in self.poses_se3]
elif right_mul and propagate:
# Transform each pose and propagate resulting drift to the next.
ids = np.arange(0, self.num_poses, 1)
ids = np.arange(0, self.num_poses, 1, dtype=int)
rel_poses = [
lie.relative_se3(self.poses_se3[i], self.poses_se3[j]).dot(t)
for i, j in zip(ids, ids[1:])
Expand Down

0 comments on commit 4838b51

Please sign in to comment.