diff --git a/pyopencl/clrandom.py b/pyopencl/clrandom.py index a07b2f64512dcb271aaef67395e6d321827cad47..ea3862bc4d999e593e1dda9ad8d549423ffeb7b2 100644 --- a/pyopencl/clrandom.py +++ b/pyopencl/clrandom.py @@ -764,8 +764,7 @@ def rand(queue, shape, dtype, luxury=None, a=0, b=1): from pyopencl.array import Array gen = _get_generator(queue.context) result = Array(queue, shape, dtype) - result.add_event( - gen.fill_uniform(result, a=a, b=b)) + gen.fill_uniform(result, a=a, b=b) return result