Skip to content

Commit

Permalink
use Generator instead of legacy np.random.random
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Dec 11, 2024
1 parent 01263d5 commit 170b8e8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_unit/test_nwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ def test_create_pose_and_skeleton_objects():
def create_test_pose_estimation_series(
n_time=100, n_dims=2, keypoint="front_left_paw"
):
data = np.random.rand(
n_time, n_dims
) # num_frames x (x, y) but can be (x, y, z)
rng = np.random.default_rng(42)
data = rng.random((n_time, n_dims)) # num_frames x n_space_dims (2 or 3)
timestamps = np.linspace(0, 10, num=n_time) # a timestamp for every frame
confidence = np.ones((n_time,)) # a confidence value for every frame
reference_frame = "(0,0,0) corresponds to ..."
Expand Down

0 comments on commit 170b8e8

Please sign in to comment.