diff --git a/pyopencl/array.py b/pyopencl/array.py index b96c2a504ba88214be221c78911295b1ca341066..15ed2bbbf281888b8625a19a7ff723c2b54c199c 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -2749,7 +2749,8 @@ def hstack(arrays, queue=None): "an instance of the type of arrays[0]", stacklevel=2) - result = arrays[0].__class__(queue, lead_shape+(w,), arrays[0].dtype) + result = arrays[0].__class__(queue, lead_shape+(w,), arrays[0].dtype, + allocator=arrays[0].allocator) index = 0 for ary in arrays: result[..., index:index+ary.shape[-1]] = ary