diff --git a/pyopencl/array.py b/pyopencl/array.py index 40187cb836c3c24cf3eff9d609bc952183839222..e05ba222f640fa35a7bcf9a08b1bedff0d1c0693 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -2138,8 +2138,9 @@ def zeros(queue, shape, dtype, order="C", allocator=None): *context* argument was deprecated. """ - result = Array(queue, shape, dtype, - order=order, allocator=allocator) + result = Array(None, shape, dtype, + order=order, allocator=allocator, + _context=queue.context, _queue=queue) result._zero_fill() return result @@ -2158,7 +2159,7 @@ def zeros_like(ary): as *other_ary*. """ - result = empty_like(ary) + result = ary._new_like_me() result._zero_fill() return result