Skip to content

Commit

Permalink
remove scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Aug 16, 2024
1 parent 05ec6c8 commit 78d13b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 191 deletions.
188 changes: 0 additions & 188 deletions metadrive/component/vehicle/vehicle_utils.py

This file was deleted.

5 changes: 3 additions & 2 deletions metadrive/utils/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Tuple

import numpy as np
from scipy.interpolate import interp1d

number_pos_inf = float("inf")
number_neg_inf = float("-inf")
Expand Down Expand Up @@ -276,6 +275,8 @@ def resample_polyline(points, target_distance):
resampled_distances = np.arange(0, distances[-1], target_distance)

# Interpolate the points along the resampled distances
resampled_points = interp1d(distances, points, axis=0)(resampled_distances)
resampled_points = np.empty((len(resampled_distances), points.shape[1]))
for i in range(points.shape[1]):
resampled_points[:, i] = np.interp(resampled_distances, distances, points[:, i])

return resampled_points
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ def is_win():
"pytest",
"opencv-python",
"lxml",
"scipy",
"psutil",
"geopandas",
"shapely",
"filelock",
"Pygments",
]

test_requirement = [
"scipy"
]

cuda_requirement = [
"cuda-python==12.0.0",
Expand Down

0 comments on commit 78d13b9

Please sign in to comment.