Skip to content

Commit 98f8f4e

Browse files
committed
Fix failing tests
1 parent 80686d5 commit 98f8f4e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

highway_env/interval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def polytope(
169169
for vertex_id in vertices_id:
170170
params_vertex = params_intervals[vertex_id, np.arange(len(vertex_id))]
171171
d_a.append(parametrized_f(params_vertex) - parametrized_f(params_means))
172-
d_a = list({d_a_i.tostring(): d_a_i for d_a_i in d_a}.values())
172+
d_a = list({str(d_a_i): d_a_i for d_a_i in d_a}.values())
173173
return a0, d_a
174174

175175

highway_env/road/spline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _get_idx_segment_for_lon(self, lon: float) -> int:
9494
return len(self.s_samples) - 1
9595
if idx_smaller[0] == 0:
9696
return 0
97-
return int(idx_smaller[0]) - 1
97+
return int(idx_smaller[0].item()) - 1
9898

9999
@staticmethod
100100
def sample_curve(x_curve, y_curve, length: float, CURVE_SAMPLE_DISTANCE=1):

0 commit comments

Comments
 (0)