From 3f515c5aac84ad4d473a5512f3c5a94b420cef14 Mon Sep 17 00:00:00 2001 From: Montgomery Alban Date: Wed, 28 Feb 2024 21:51:06 +0000 Subject: [PATCH] Fix inappropriately reassigned variable. --- smarts/env/utils/observation_conversion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smarts/env/utils/observation_conversion.py b/smarts/env/utils/observation_conversion.py index 1109cefbde..1f1fd051bb 100644 --- a/smarts/env/utils/observation_conversion.py +++ b/smarts/env/utils/observation_conversion.py @@ -224,7 +224,7 @@ def _format_neighborhood_vehicle_states( "speed": np.zeros((des_shp,), dtype=np.float32), } - neighborhood_vehicle_states = [ + out_nvs = [ ( nghb.bounding_box.as_lwh, nghb.heading, @@ -235,10 +235,10 @@ def _format_neighborhood_vehicle_states( _format_id(nghb.lane_id, _WAYPOINT_NAME_LIMIT, "lane id"), nghb.interest, ) - for nghb in neighborhood_vehicle_states[:des_shp] + for nghb in out_nvs[:des_shp] ] box, heading, vehicle_id, lane_index, pos, speed, lane_id, interest = zip( - *neighborhood_vehicle_states + *out_nvs ) box = np.array(box, dtype=np.float32)