diff --git a/dpnp/tests/third_party/cupy/random_tests/test_sample.py b/dpnp/tests/third_party/cupy/random_tests/test_sample.py index 703385c3769..0507e11763c 100644 --- a/dpnp/tests/third_party/cupy/random_tests/test_sample.py +++ b/dpnp/tests/third_party/cupy/random_tests/test_sample.py @@ -89,7 +89,7 @@ def test_bound_float2(self): def test_goodness_of_fit(self): mx = 5 trial = 100 - vals = [random.randint(mx) for _ in range(trial)] + vals = [random.randint(mx).asnumpy() for _ in range(trial)] counts = numpy.histogram(vals, bins=numpy.arange(mx + 1))[0] expected = numpy.array([float(trial) / mx] * mx) assert _hypothesis.chi_square_test(counts, expected) @@ -97,7 +97,7 @@ def test_goodness_of_fit(self): @_condition.repeat(3, 10) def test_goodness_of_fit_2(self): mx = 5 - vals = random.randint(mx, size=(5, 20)) + vals = random.randint(mx, size=(5, 20)).asnumpy() counts = numpy.histogram(vals, bins=numpy.arange(mx + 1))[0] expected = numpy.array([float(vals.size) / mx] * mx) assert _hypothesis.chi_square_test(counts, expected) @@ -191,7 +191,7 @@ def test_bound_2(self): def test_goodness_of_fit(self): mx = 5 trial = 100 - vals = [random.randint(0, mx) for _ in range(trial)] + vals = [random.randint(0, mx).asnumpy() for _ in range(trial)] counts = numpy.histogram(vals, bins=numpy.arange(mx + 1))[0] expected = numpy.array([float(trial) / mx] * mx) assert _hypothesis.chi_square_test(counts, expected) @@ -199,7 +199,7 @@ def test_goodness_of_fit(self): @_condition.repeat(3, 10) def test_goodness_of_fit_2(self): mx = 5 - vals = random.randint(0, mx, (5, 20)) + vals = random.randint(0, mx, (5, 20)).asnumpy() counts = numpy.histogram(vals, bins=numpy.arange(mx + 1))[0] expected = numpy.array([float(vals.size) / mx] * mx) assert _hypothesis.chi_square_test(counts, expected)