Skip to content

Commit

Permalink
tests: fix rng.random use
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Apr 12, 2024
1 parent 22dbc17 commit 3bec81d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- fix use of np.random in tests

## [1.4.0] - 2024-04-12

- Add a SO3 curves which is C2. It's called S03Smooth
Expand Down
12 changes: 6 additions & 6 deletions python/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@ def test_piecewise_polynomial_curve(self):
def test_piecewise_from_points_list(self):
N = 7
rng = random.default_rng()
points = array(rng.random(3, N))
points_derivative = array(rng.random(3, N))
points_second_derivative = array(rng.random(3, N))
time_points = array(rng.random(1, N)).T
points = array(rng.random((3, N)))
points_derivative = array(rng.random((3, N)))
points_second_derivative = array(rng.random((3, N)))
time_points = array(rng.random((1, N))).T
time_points.sort(0)
polC0 = piecewise.FromPointsList(points, time_points)
self.assertEqual(polC0.min(), time_points[0, 0])
Expand Down Expand Up @@ -1286,10 +1286,10 @@ def test_se3_from_translation_curve(self):
# test with piecewise polynomial
N = 7
rng = random.default_rng()
points = array(rng.random(3, N))
points = array(rng.random((3, N)))
# points_derivative = array(random.rand(3, N))
# points_second_derivative = array(random.rand(3, N))
time_points = array(rng.random(1, N)).T
time_points = array(rng.random((1, N))).T
time_points.sort(0)
translation = piecewise3.FromPointsList(points, time_points)
min = translation.min()
Expand Down

0 comments on commit 3bec81d

Please sign in to comment.