Skip to content
Snippets Groups Projects
Commit 3a96299f authored by Matthias Diener's avatar Matthias Diener Committed by Andreas Klöckner
Browse files

hstack: fix allocator

parent c7718d20
No related branches found
No related tags found
No related merge requests found
Pipeline #323968 passed with warnings
...@@ -2749,7 +2749,8 @@ def hstack(arrays, queue=None): ...@@ -2749,7 +2749,8 @@ def hstack(arrays, queue=None):
"an instance of the type of arrays[0]", "an instance of the type of arrays[0]",
stacklevel=2) 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 index = 0
for ary in arrays: for ary in arrays:
result[..., index:index+ary.shape[-1]] = ary result[..., index:index+ary.shape[-1]] = ary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment