Skip to content

Commit

Permalink
Fix inappropriately reassigned variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gamenot committed Feb 28, 2024
1 parent f95ab67 commit 3f515c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smarts/env/utils/observation_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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)
Expand Down

0 comments on commit 3f515c5

Please sign in to comment.