Skip to content
Snippets Groups Projects
Commit 1f6d1d1c authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

as_strided: Deal with length-zero shape/strides

parent 26eb068c
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -1711,8 +1711,10 @@ def as_strided(ary, shape=None, strides=None):
# undocumented for the moment
shape = shape or ary.shape
strides = strides or ary.strides
if shape is None:
shape = ary.shape
if strides is None:
strides = ary.strides
return Array(ary.queue, shape, ary.dtype, allocator=ary.allocator,
data=ary.data, strides=strides)
......
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