diff --git a/python/fusion_engine_client/analysis/data_loader.py b/python/fusion_engine_client/analysis/data_loader.py index 38a5d80b..5454ff24 100644 --- a/python/fusion_engine_client/analysis/data_loader.py +++ b/python/fusion_engine_client/analysis/data_loader.py @@ -67,7 +67,7 @@ def to_numpy(self, remove_nan_times: bool = True): if do_conversion: self.__dict__.update(self.message_class.to_numpy(self.messages)) - self.messages_bytes = np.array(self.messages_bytes, dtype=int) + self.messages_bytes = np.array(self.messages_bytes, dtype=np.uint64) self.message_index = np.array(self.message_index, dtype=int) if remove_nan_times and 'p1_time' in self.__dict__: diff --git a/python/fusion_engine_client/messages/measurements.py b/python/fusion_engine_client/messages/measurements.py index bfff7666..4ddee0c2 100644 --- a/python/fusion_engine_client/messages/measurements.py +++ b/python/fusion_engine_client/messages/measurements.py @@ -592,10 +592,10 @@ def __str__(self): @classmethod def to_numpy(cls, messages): result = { - 'front_left_wheel_ticks': np.array([m.front_left_wheel_ticks for m in messages], dtype=int), - 'front_right_wheel_ticks': np.array([m.front_right_wheel_ticks for m in messages], dtype=int), - 'rear_left_wheel_ticks': np.array([m.rear_left_wheel_ticks for m in messages], dtype=int), - 'rear_right_wheel_ticks': np.array([m.rear_right_wheel_ticks for m in messages], dtype=int), + 'front_left_wheel_ticks': np.array([m.front_left_wheel_ticks for m in messages], dtype=np.uint32), + 'front_right_wheel_ticks': np.array([m.front_right_wheel_ticks for m in messages], dtype=np.uint32), + 'rear_left_wheel_ticks': np.array([m.rear_left_wheel_ticks for m in messages], dtype=np.uint32), + 'rear_right_wheel_ticks': np.array([m.rear_right_wheel_ticks for m in messages], dtype=np.uint32), 'gear': np.array([m.gear for m in messages], dtype=int), } result.update(MeasurementDetails.to_numpy([m.details for m in messages])) @@ -690,7 +690,7 @@ def __str__(self): @classmethod def to_numpy(cls, messages): result = { - 'tick_count': np.array([m.tick_count for m in messages], dtype=int), + 'tick_count': np.array([m.tick_count for m in messages], dtype=np.uint32), 'gear': np.array([m.gear for m in messages], dtype=int), } result.update(MeasurementDetails.to_numpy([m.details for m in messages])) @@ -1003,7 +1003,7 @@ def calcsize(cls) -> int: def to_numpy(cls, messages: Sequence['HeadingOutput']): result = { 'solution_type': np.array([int(m.solution_type) for m in messages], dtype=int), - 'flags': np.array([int(m.flags) for m in messages], dtype=int), + 'flags': np.array([int(m.flags) for m in messages], dtype=np.uint32), 'ypr_deg': np.array([m.ypr_deg for m in messages]).T, 'heading_true_north_deg': np.array([m.heading_true_north_deg for m in messages], dtype=float).T, } @@ -1122,7 +1122,7 @@ def calcsize(cls) -> int: def to_numpy(cls, messages: Sequence['RawHeadingOutput']): result = { 'solution_type': np.array([int(m.solution_type) for m in messages], dtype=int), - 'flags': np.array([int(m.flags) for m in messages], dtype=int), + 'flags': np.array([int(m.flags) for m in messages], dtype=np.uint32), 'relative_position_enu_m': np.array([m.relative_position_enu_m for m in messages]).T, 'position_std_enu_m': np.array([m.position_std_enu_m for m in messages]).T, 'heading_true_north_deg': np.array([float(m.heading_true_north_deg) for m in messages]), diff --git a/python/fusion_engine_client/messages/solution.py b/python/fusion_engine_client/messages/solution.py index 2ae6045f..c7835c42 100644 --- a/python/fusion_engine_client/messages/solution.py +++ b/python/fusion_engine_client/messages/solution.py @@ -387,7 +387,7 @@ def to_numpy(cls, messages): 'num_svs': np.array([int(m.num_svs) for m in messages], dtype=int), 'corrections_age_sec': np.array([m.corrections_age_sec for m in messages]), 'baseline_distance_m': np.array([m.baseline_distance_m for m in messages]), - 'reference_station_id': np.array([int(m.reference_station_id) for m in messages], dtype=int), + 'reference_station_id': np.array([int(m.reference_station_id) for m in messages], dtype=np.uint32), 'gdop': np.array([m.gdop for m in messages]), 'pdop': np.array([m.pdop for m in messages]), 'hdop': np.array([m.hdop for m in messages]),