|
15 | 15 | from dpnp.dpnp_array import dpnp_array
|
16 | 16 | from dpnp.random import RandomState
|
17 | 17 |
|
18 |
| -from .helper import is_cpu_device |
| 18 | +from .helper import get_array, is_cpu_device |
19 | 19 |
|
20 | 20 | # aspects of default device:
|
21 | 21 | _def_device = dpctl.SyclQueue().sycl_device
|
@@ -224,7 +224,7 @@ def test_fallback(self, loc, scale):
|
224 | 224 | # dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy
|
225 | 225 | actual = data.asnumpy()
|
226 | 226 | 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 |
228 | 228 | )
|
229 | 229 |
|
230 | 230 | dtype = get_default_floating()
|
@@ -557,7 +557,7 @@ def test_bounds_fallback(self, low, high):
|
557 | 557 | RandomState(seed).randint(low=low, high=high, size=size).asnumpy()
|
558 | 558 | )
|
559 | 559 | 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 |
561 | 561 | )
|
562 | 562 | assert_equal(actual, expected)
|
563 | 563 |
|
@@ -1139,7 +1139,7 @@ def test_fallback(self, low, high):
|
1139 | 1139 | # dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy
|
1140 | 1140 | actual = data.asnumpy()
|
1141 | 1141 | 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 |
1143 | 1143 | )
|
1144 | 1144 |
|
1145 | 1145 | dtype = get_default_floating()
|
|
0 commit comments