Skip to content

Commit c9a2d1f

Browse files
Address review: use np.linspace instead of RNG
Random not advisable, deterministic inputs better in tests
1 parent 9f7cf0d commit c9a2d1f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/test_tracking.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,7 @@ def test_calc_surface_orientation_2d(shape):
564564
# Regression test for GH#2747: calc_surface_orientation must accept
565565
# tracker_theta of arbitrary rank, not just 1-D. Compare the >1-D result
566566
# to the 1-D result computed on the flattened input.
567-
rng = np.random.default_rng(0)
568-
rotations_flat = rng.uniform(-90, 90, size=int(np.prod(shape)))
567+
rotations_flat = np.linspace(-90, 90, int(np.prod(shape)))
569568
rotations_nd = rotations_flat.reshape(shape)
570569

571570
out_1d = tracking.calc_surface_orientation(rotations_flat,

0 commit comments

Comments
 (0)