Skip to content

Commit

Permalink
random test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fcharras committed Oct 27, 2022
1 parent 477e998 commit 9a23db2
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions sklearn_numba_dpex/common/tests/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,18 @@ def test_xoroshiro128pp():

assert expected_res_1 == actual_res_1

expected_res_2 = np.array(
[
9942514532200612717,
9103904774276862560,
11668728844103653792,
15855991950793068140,
757481706500168315,
9624528390636036977,
5518335522560806466,
11098424226258286153,
8475596632683116788,
12040925107571057860,
],
dtype=np.uint64,
)
expected_res_2 = [
9942514532200612717,
9103904774276862560,
11668728844103653792,
15855991950793068140,
757481706500168315,
9624528390636036977,
5518335522560806466,
11098424226258286153,
8475596632683116788,
12040925107571057860,
]

random_state = create_xoroshiro128pp_states(
n_states=1, seed=42, subsequence_start=1
Expand All @@ -64,4 +61,4 @@ def test_xoroshiro128pp():
int(dpt.asnumpy(get_random_raw(random_state))[0]) for i in range(10)
]

assert expected_res_1 == actual_res_1
assert expected_res_2 == actual_res_2

0 comments on commit 9a23db2

Please sign in to comment.