Skip to content

Commit

Permalink
Fixed Deprecated API in SciPy
Browse files Browse the repository at this point in the history
  • Loading branch information
BaiBaiBaiSTRONG committed Dec 29, 2024
1 parent e58455a commit 1337001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion legged_gym/utils/terrain_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def random_uniform_terrain(terrain, min_height, max_height, step=1, downsampled_
x = np.linspace(0, terrain.width * terrain.horizontal_scale, height_field_downsampled.shape[0])
y = np.linspace(0, terrain.length * terrain.horizontal_scale, height_field_downsampled.shape[1])

f = interpolate.interp2d(y, x, height_field_downsampled, kind='linear')
# f = interpolate.interp2d(y, x, height_field_downsampled, kind='linear')
f = interpolate.RectBivariateSpline(x, y, height_field_downsampled, kx=1, ky=1)

x_upsampled = np.linspace(0, terrain.width * terrain.horizontal_scale, terrain.width)
y_upsampled = np.linspace(0, terrain.length * terrain.horizontal_scale, terrain.length)
Expand Down

0 comments on commit 1337001

Please sign in to comment.