From 96bc91b921907bf149368b45125cb8e9f518afbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9on=20Avic=20Simmons?= Date: Fri, 18 Sep 2026 08:11:10 -0400 Subject: [PATCH] docs: fix 8 typos and grammar errors in comments and documentation --- kapture/core/PoseTransform.py | 6 +++--- kapture/core/Sensors.py | 2 +- kapture/io/binary.py | 2 +- tools/kapture_export_4seasons_pairs.py | 2 +- tools/kapture_export_LTVL2020.py | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kapture/core/PoseTransform.py b/kapture/core/PoseTransform.py index 0867d05..f6a80cb 100644 --- a/kapture/core/PoseTransform.py +++ b/kapture/core/PoseTransform.py @@ -32,7 +32,7 @@ def __init__(self, r=[1, 0, 0, 0], t=[0, 0, 0]): # already a quaternion : copy aziz (lumière) self._r = r elif isinstance(r, (list, np.ndarray, np.generic)): - # its a list or numpy => convert to quaternion if valid + # it's a list or numpy => convert to quaternion if valid self._r = quaternion.from_float_array(r) else: # unknown entry self._r = None @@ -47,7 +47,7 @@ def __init__(self, r=[1, 0, 0, 0], t=[0, 0, 0]): # numpy : copy aziz lumière self._t = t elif isinstance(t, list): - # its a list: convert to numpy if valid + # it's a list: convert to numpy if valid self._t = np.array(t, dtype=float) else: self._t = None @@ -59,7 +59,7 @@ def __init__(self, r=[1, 0, 0, 0], t=[0, 0, 0]): # sum trick from https://stackoverflow.com/questions/6736590/fast-check-for-nan-in-numpy self._t = None else: - # make sure af the shape of t + # make sure of the shape of t self._t = self._t.reshape((3, 1)) @property diff --git a/kapture/core/Sensors.py b/kapture/core/Sensors.py index 33102e7..fdd4ad9 100644 --- a/kapture/core/Sensors.py +++ b/kapture/core/Sensors.py @@ -208,7 +208,7 @@ def camera_params(self) -> List[float]: def create_sensor(sensor_type: str, sensor_params: Optional[list] = None, name: Optional[str] = None): """ - Creates a instance of a sensor + Creates an instance of a sensor :param sensor_type: type of sensor ('camera', ...) :param sensor_params: sensor specific parameters diff --git a/kapture/io/binary.py b/kapture/io/binary.py index 58b1c96..41c03af 100644 --- a/kapture/io/binary.py +++ b/kapture/io/binary.py @@ -1,7 +1,7 @@ # Copyright 2020-present NAVER Corp. Under BSD 3-clause license """ -This files contains IO operations on binary file. +This file contains IO operations on binary file. """ import os import os.path as path diff --git a/tools/kapture_export_4seasons_pairs.py b/tools/kapture_export_4seasons_pairs.py index 01e9049..5851fbf 100755 --- a/tools/kapture_export_4seasons_pairs.py +++ b/tools/kapture_export_4seasons_pairs.py @@ -88,7 +88,7 @@ def export_4seasons_pairfile(kapture_dir_path: str, for mapping_ts, query_ts in tqdm(pairs, disable=hide_progress): try: if mapping_ts not in kapture_data.trajectories: - # mapping, means its probab + # mapping, means its probable raise IndexError(f'No pose available in trajectory for mapping at time {mapping_ts}. ' f'Have you merged mapping and query in the same kapture dataset ?') diff --git a/tools/kapture_export_LTVL2020.py b/tools/kapture_export_LTVL2020.py index 63e1882..8ab42fc 100755 --- a/tools/kapture_export_LTVL2020.py +++ b/tools/kapture_export_LTVL2020.py @@ -45,7 +45,7 @@ def export_ltvl(kapture_dirpath: str, :param prepend_camera_name: 2nd operation, if True, it will prepend the camera name to the image file names :param truncate_extensions: 3rd operation, if True, name is image_name before the first dot """ - # only load (1) image records + (2) trajectories (that all that matters). + # only load (1) image records + (2) trajectories (that's all that matters). # 1: load records records_camera_filepath = kapture.io.csv.get_csv_fullpath(kapture.RecordsCamera, kapture_dirpath) logger.debug(f'loading {records_camera_filepath}') @@ -125,7 +125,7 @@ def export_ltvl2020_command_line() -> None: parser.add_argument('-p', '--prepend_cam', action='store_true', default=False, help=('2nd operation applied: ' 'when False (default), nothing is changed.' - 'wen True, prepend camera names to filename (required for some dataset)')) + 'when True, prepend camera names to filename (required for some dataset)')) parser.add_argument('--truncate-extensions', action='store_true', default=False, help=('2nd operation applied: ' 'when False (default), nothing is changed.'