Skip to content

Commit 6b9a918

Browse files
committed
Update tests for random state
1 parent 6df49b4 commit 6b9a918

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dpnp/tests/test_random_state.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from dpnp.dpnp_array import dpnp_array
1616
from dpnp.random import RandomState
1717

18-
from .helper import is_cpu_device
18+
from .helper import get_array, is_cpu_device
1919

2020
# aspects of default device:
2121
_def_device = dpctl.SyclQueue().sycl_device
@@ -224,7 +224,7 @@ def test_fallback(self, loc, scale):
224224
# dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy
225225
actual = data.asnumpy()
226226
expected = numpy.random.RandomState(seed).normal(
227-
loc=loc, scale=scale, size=size
227+
loc=get_array(numpy, loc), scale=get_array(numpy, scale), size=size
228228
)
229229

230230
dtype = get_default_floating()
@@ -557,7 +557,7 @@ def test_bounds_fallback(self, low, high):
557557
RandomState(seed).randint(low=low, high=high, size=size).asnumpy()
558558
)
559559
expected = numpy.random.RandomState(seed).randint(
560-
low=low, high=high, size=size
560+
low=get_array(numpy, low), high=get_array(numpy, high), size=size
561561
)
562562
assert_equal(actual, expected)
563563

@@ -1139,7 +1139,7 @@ def test_fallback(self, low, high):
11391139
# dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy
11401140
actual = data.asnumpy()
11411141
expected = numpy.random.RandomState(seed).uniform(
1142-
low=low, high=high, size=size
1142+
low=get_array(numpy, low), high=get_array(numpy, high), size=size
11431143
)
11441144

11451145
dtype = get_default_floating()

0 commit comments

Comments
 (0)