Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move scipy to test dependencies + remove some usage #754

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,7 +55,6 @@ def is_win():
"pytest",
"opencv-python",
"lxml",
"scipy",
"psutil",
"geopandas",
"shapely",
Expand All @@ -64,6 +63,9 @@ def is_win():
"mediapy"
]

test_requirement = [
"scipy"
]

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