Skip to content

Commit

Permalink
hstack: fix allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Aug 9, 2022
1 parent c7718d2 commit 3a96299
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyopencl/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a96299

Please sign in to comment.