From f77d8ded6028450d06f9a6c4bb763e093d7d1284 Mon Sep 17 00:00:00 2001 From: Anton Volkov Date: Mon, 20 Jan 2025 12:58:28 +0100 Subject: [PATCH] Update tests for random state --- dpnp/tests/test_random_state.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dpnp/tests/test_random_state.py b/dpnp/tests/test_random_state.py index 7107a919c4e..72afd5fcb24 100644 --- a/dpnp/tests/test_random_state.py +++ b/dpnp/tests/test_random_state.py @@ -15,7 +15,7 @@ from dpnp.dpnp_array import dpnp_array from dpnp.random import RandomState -from .helper import is_cpu_device +from .helper import get_array, is_cpu_device # aspects of default device: _def_device = dpctl.SyclQueue().sycl_device @@ -224,7 +224,7 @@ def test_fallback(self, loc, scale): # dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy actual = data.asnumpy() expected = numpy.random.RandomState(seed).normal( - loc=loc, scale=scale, size=size + loc=get_array(numpy, loc), scale=get_array(numpy, scale), size=size ) dtype = get_default_floating() @@ -557,7 +557,7 @@ def test_bounds_fallback(self, low, high): RandomState(seed).randint(low=low, high=high, size=size).asnumpy() ) expected = numpy.random.RandomState(seed).randint( - low=low, high=high, size=size + low=get_array(numpy, low), high=get_array(numpy, high), size=size ) assert_equal(actual, expected) @@ -1139,7 +1139,7 @@ def test_fallback(self, low, high): # dpnp accepts only scalar as low and/or high, in other cases it will be a fallback to numpy actual = data.asnumpy() expected = numpy.random.RandomState(seed).uniform( - low=low, high=high, size=size + low=get_array(numpy, low), high=get_array(numpy, high), size=size ) dtype = get_default_floating()