Skip to content

Commit

Permalink
[gym_jiminy/common] 'sample' does not return 'np.ndarray' systematica…
Browse files Browse the repository at this point in the history
…lly.
  • Loading branch information
duburcqa committed Jan 5, 2025
1 parent 2a5debc commit 930bc70
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/gym_jiminy/common/gym_jiminy/common/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ def sample(low: Union[float, np.ndarray] = -1.0,
else:
dist_fn = dist

# Generate samples from distribution.
# Make sure that the result is always returned as np.ndarray.
value = np.asarray(dist_fn(rg or GLOBAL_RNG, size=shape))
# Generate samples from distribution
value = dist_fn(rg or GLOBAL_RNG, size=shape)

# Apply mean and standard deviation transformation
value = mean + dev * value
Expand Down

0 comments on commit 930bc70

Please sign in to comment.