diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index ba522a4bb66d..c8f80cfda3d2 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -1763,8 +1763,8 @@ def hybrid_forward(self, F, a, b, *args, **kwargs): for lshape, rshape in shape_pairs: for func in funcs: - x1 = np.random.uniform(size=lshape) > 0.5 - x2 = np.random.uniform(size=rshape) > 0.5 + x1 = np.array(_np.random.uniform(size=lshape) > 0.5) + x2 = np.array(_np.random.uniform(size=rshape) > 0.5) check_boolean_binary_func(func, x1, x2)