diff --git a/dpnp/random/dpnp_random_state.py b/dpnp/random/dpnp_random_state.py index 412d9dec0f81..c224553b0cff 100644 --- a/dpnp/random/dpnp_random_state.py +++ b/dpnp/random/dpnp_random_state.py @@ -337,7 +337,7 @@ def randint(self, low, high=None, size=None, dtype=int, usm_type="device"): if not use_origin_backend(low): if not dpnp.isscalar(low): pass - elif not dpnp.isscalar(high): + elif not (high is None or dpnp.isscalar(high)): pass else: _dtype = dpnp.int32 if dtype is int else dpnp.dtype(dtype) diff --git a/tests/third_party/cupy/random_tests/test_sample.py b/tests/third_party/cupy/random_tests/test_sample.py index 3f8a0169ac12..f3b844cdc6a5 100644 --- a/tests/third_party/cupy/random_tests/test_sample.py +++ b/tests/third_party/cupy/random_tests/test_sample.py @@ -33,7 +33,6 @@ def test_lo_hi_nonrandom(self): a = random.randint(-1.1, -0.9, size=(2, 2)) numpy.testing.assert_array_equal(a, cupy.full((2, 2), -1)) - @pytest.mark.usefixtures("allow_fall_back_on_numpy") def test_zero_sizes(self): a = random.randint(10, size=(0,)) numpy.testing.assert_array_equal(a, cupy.array(())) @@ -112,7 +111,6 @@ def test_goodness_of_fit_2(self): self.assertTrue(hypothesis.chi_square_test(counts, expected)) -@pytest.mark.usefixtures("allow_fall_back_on_numpy") @testing.gpu class TestRandintDtype(unittest.TestCase):