diff --git a/pyopencl/array.py b/pyopencl/array.py index 905a96100e17f86a23f1dfe4c0fa80e10e006f52..d3439739fd3d1a5b9753d2f6a62669b3db4fb269 100644 --- a/pyopencl/array.py +++ b/pyopencl/array.py @@ -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)